gnahotelsolutions/laravel-trailing-slash

End your Laravel project routes with trailing slash

1.4.0 2022-05-05 07:29 UTC

This package is auto-updated.

Last update: 2024-04-05 11:39:48 UTC


README

Latest Version on Packagist Build status Quality Score Total Downloads

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.