PHPackages                             illuminatech/url-trailing-slash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. illuminatech/url-trailing-slash

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

illuminatech/url-trailing-slash
===============================

Allows enforcing URL routes with or without trailing slash

1.1.16(1mo ago)50216.9k↑34%6BSD-3-ClausePHPCI passing

Since Jul 8Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/illuminatech/url-trailing-slash)[ Packagist](https://packagist.org/packages/illuminatech/url-trailing-slash)[ GitHub Sponsors](https://github.com/klimov-paul)[ Patreon](https://www.patreon.com/klimov_paul)[ RSS](/packages/illuminatech-url-trailing-slash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (20)Used By (0)

 [ ![](https://avatars1.githubusercontent.com/u/47185924) ](https://github.com/illuminatech)

Laravel URL Route Trailing Slash
================================

[](#laravel-url-route-trailing-slash)

This extension allows enforcing URL routes with or without trailing slash.

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/dd0f6dda8d5003e578fd420806b56753295ebc2a2b985efac746a37685fda7c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696c6c756d696e61746563682f75726c2d747261696c696e672d736c6173682e737667)](https://packagist.org/packages/illuminatech/url-trailing-slash)[![Total Downloads](https://camo.githubusercontent.com/2ad95d968b1bae7bb3c38ace6123e5b6ece8b1d3ce5ddf3247743561872debbb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696c6c756d696e61746563682f75726c2d747261696c696e672d736c6173682e737667)](https://packagist.org/packages/illuminatech/url-trailing-slash)[![Build Status](https://github.com/illuminatech/url-trailing-slash/workflows/build/badge.svg)](https://github.com/illuminatech/url-trailing-slash/actions)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist illuminatech/url-trailing-slash

```

or add

```
"illuminatech/url-trailing-slash": "*"
```

to the require section of your composer.json.

Once package is installed you should manually register `\Illuminatech\UrlTrailingSlash\RoutingServiceProvider` instance at your application in the way it comes before kernel instantiation, e.g. at the application bootstrap stage. This can be done in 'bootstrap/app.php' file of regular Laravel application. For example:

```
