End your Laravel project routes with trailing slash
gnahotelsolutions/laravel-trailing-slash is a Laravel package for end your laravel project routes with trailing slash.
It currently has 11 GitHub stars and 3.463 downloads on Packagist (latest version 1.5.2).
Install it with composer require gnahotelsolutions/laravel-trailing-slash.
Discover more Laravel packages by gnahotelsolutions
or browse all Laravel packages to compare alternatives.
Last updated
With this package you will be able to end your Laravel project routes with trailing slash.
You can install the package via composer:
composer require gnahotelsolutions/laravel-trailing-slash
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]
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.