https://github.com/vormkracht10/laravel-trailing-slash
Use Laravel explicitly with or without trailing slashes, controlling URL generation and proper redirects for SEO.
https://github.com/vormkracht10/laravel-trailing-slash
Last synced: 5 months ago
JSON representation
Use Laravel explicitly with or without trailing slashes, controlling URL generation and proper redirects for SEO.
- Host: GitHub
- URL: https://github.com/vormkracht10/laravel-trailing-slash
- Owner: vormkracht10
- License: mit
- Created: 2024-04-20T11:37:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-22T07:29:53.000Z (about 1 year ago)
- Last Synced: 2024-12-12T15:17:29.205Z (6 months ago)
- Language: PHP
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Trailing Slash
[](https://packagist.org/packages/vormkracht10/laravel-trailing-slash)
[](https://github.com/vormkracht10/laravel-trailing-slash/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/vormkracht10/laravel-trailing-slash/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/vormkracht10/laravel-trailing-slash)Use Laravel explicitly with or without trailing slashes, controlling URL generation and proper redirects for SEO. Works out of the box on installation, without modifications to your application code.
## Installation
You can install the package via composer:
```bash
composer require vormkracht10/laravel-trailing-slash
```You can publish the config file with:
```bash
php artisan vendor:publish --tag="laravel-trailing-slash-config"
```This is the contents of the published config file:
```php
return [
// Enable or disable trailing slashes
'trailing' => env('TRAILING_SLASHES', true),// Enable or disable automatic setup of this package
// When enabled, only installing this package is sufficient for everything to work
'auto' => env('TRAILING_SLASHES_AUTO', true),// Execute middleware only on these methods
'methods' => [
'GET', 'HEAD', 'OPTIONS',
],
];
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Mark van Eijk](https://github.com/markvaneijk)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.