PHPackages                             gnahotelsolutions/laravel-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. gnahotelsolutions/laravel-trailing-slash

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

gnahotelsolutions/laravel-trailing-slash
========================================

End your Laravel project routes with trailing slash

1.5.2(7mo ago)113.3k↓50%1MITPHPPHP ^8.2CI passing

Since Jun 4Pushed 7mo ago5 watchersCompare

[ Source](https://github.com/gnahotelsolutions/laravel-trailing-slash)[ Packagist](https://packagist.org/packages/gnahotelsolutions/laravel-trailing-slash)[ Docs](https://github.com/gnahotelsolutions/laravel-trailing-slash)[ RSS](/packages/gnahotelsolutions-laravel-trailing-slash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (9)Used By (0)

Laravel trailing slash
======================

[](#laravel-trailing-slash)

[![Latest Version on Packagist](https://camo.githubusercontent.com/81209ffc3262d2124493cd0b9bc57b4023b605f5903f47bae244cccabaf7133e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d747261696c696e672d736c6173682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnahotelsolutions/laravel-trailing-slash)[![Build status](https://github.com/gnahotelsolutions/laravel-trailing-slash/actions/workflows/laravel.yml/badge.svg)](https://github.com/gnahotelsolutions/laravel-trailing-slash/actions/workflows/laravel.yml/badge.svg)[![Quality Score](https://camo.githubusercontent.com/b6b17b8671675c76831834f85b591c4aed228f97746ed0b2c28beb10aaeec7f5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d747261696c696e672d736c6173682e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gnahotelsolutions/laravel-trailing-slash)[![Total Downloads](https://camo.githubusercontent.com/e4c8605b82cdad9724fe78004f6a87369268d179b646d920b05c44aeef084c8d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676e61686f74656c736f6c7574696f6e732f6c61726176656c2d747261696c696e672d736c6173682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnahotelsolutions/laravel-trailing-slash)

With this package you will be able to end your Laravel project routes with trailing slash.

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

[](#installation)

You can install the package via composer:

```
composer require gnahotelsolutions/laravel-trailing-slash
```

Usage
-----

[](#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

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [David Torralbo](https://github.com/torralbodavid)
- [David Llop](https://github.com/lloople)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance65

Regular maintenance activity

Popularity27

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 59.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~279 days

Recently: every ~432 days

Total

8

Last Release

210d ago

PHP version history (3 changes)v1.0.0PHP ^7.2

1.3.0PHP ^7.2|^8.0

1.5.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/777a92668f51536d86a9fed19c92180d626b46f134b002c3a068e92d295c7541?d=identicon)[lloople](/maintainers/lloople)

![](https://www.gravatar.com/avatar/bdbe60d3927b258f7da4a406a474892d52eb7eca924217ad5754c612b2805d0d?d=identicon)[torralbo](/maintainers/torralbo)

---

Top Contributors

[![torralbodavid](https://avatars.githubusercontent.com/u/17132682?v=4)](https://github.com/torralbodavid "torralbodavid (25 commits)")[![Lloople](https://avatars.githubusercontent.com/u/5665466?v=4)](https://github.com/Lloople "Lloople (12 commits)")[![adriacanal](https://avatars.githubusercontent.com/u/5726514?v=4)](https://github.com/adriacanal "adriacanal (3 commits)")[![gkaicb](https://avatars.githubusercontent.com/u/18529002?v=4)](https://github.com/gkaicb "gkaicb (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

hacktoberfestlaravellaravel-packagepackagephptrailing-slashgnahotelsolutionslaravel-trailing-slash

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gnahotelsolutions-laravel-trailing-slash/health.svg)

```
[![Health](https://phpackages.com/badges/gnahotelsolutions-laravel-trailing-slash/health.svg)](https://phpackages.com/packages/gnahotelsolutions-laravel-trailing-slash)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[mrmarchone/laravel-auto-crud

Laravel Auto CRUD helps you streamline development and save time.

28711.8k2](/packages/mrmarchone-laravel-auto-crud)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
