New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

backstage/laravel-trailing-slash

Use Laravel explicitly with or without trailing slashes, controlling URL generation and proper redirects for SEO.
10,739
Install
composer require backstage/laravel-trailing-slash
Latest Version:v0.1.1
PHP:^8.2
Laravel:10 – 13
License:MIT
Last Updated:Jun 5, 2026
Links: GitHub  ·  Packagist
Maintainer: ux

Laravel Trailing Slash by Backstage

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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:

composer require backstage/laravel-trailing-slash

You can publish the config file with:

php artisan vendor:publish --tag="laravel-trailing-slash-config"

This is the contents of the published config file:

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 for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

vormkracht10/laravel-google-analytics-v4

Laravel package to get insights in Google Analytics v4 data

8,444 36
backstage/laravel-translations

A Laravel translations package

7,029 3
backstage/helpers

This is my package helpers

6,653 0
backstage/filament-uploadcare-field

Uploadcare FileUpload component for Filament Forms

5,257 3
backstage/laravel-ai

This is my package ai

1,584 0

Version History

Version Released PHP Laravel License
v0.1.1 ^8.2 ^10.0|^11.0|^12.0|^13.0 MIT
v0.1.0 ^8.2 ^10.0|^11.0|^12.0 MIT