gnahotelsolutions / laravel-trailing-slash
End your Laravel project routes with trailing slash
Installs: 2 387
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 6
Forks: 1
Open Issues: 0
Requires
- php: ^7.2|^8.0
- illuminate/support: ^6.5|^7.0|^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^4.0|^5.0|^6.0
- phpunit/phpunit: ^8.0|^9.0
README
With this package you will be able to end your Laravel project routes with trailing slash.
Installation
You can install the package via composer:
composer require gnahotelsolutions/laravel-trailing-slash
Usage
Optionally, you can publish the config file of the package.
php artisan vendor:publish --provider="GNAHotelSolutions\LaravelTrailingSlash\LaravelTrailingSlashServiceProvider" --tag=config
If you want to disable the behaviour of this package, use this variable in your .env
file.
TRAILING_SLASH=false
If you want to disable the behaviour of this package just in certain areas of your application, you can modify the configuration on runtime.
config()->set('laravel-trailing-slash.active', false);
If you are using Apache on your development or production environment, remember to remove or comment this lines in public/.htaccess
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email dtorralbo@gnahs.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.