Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.36 KB

README.md

File metadata and controls

47 lines (30 loc) · 1.36 KB

Stats:

Packagist Stars

Tests:

Tests

Desensitize

The package provides an easy way to desensitize your routes in your Laravel application. In short, Desensitize makes your routes case-insensitive, so you can access any of your routes whether they are lowercase, uppercase, or both.

Installation

composer require waryor/desensitize

Usage

Register the app in \bootstrap\app.php and change the Applocation namespace to Waryor\Desensitize\Foundation\ like so:

$app = new Waryor\Desensitize\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);

To use this package simply add the following line to your boot method in your app/Providers/RouteServiceProvider.php file:

Desensitize::initialize();

If you want to desensitize your routes including a sub-folder, you can do so by passing the sub-folder to the Desensitize::initialize() method:

Desensitize::initialize("/sub-folder");

Credits

License

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