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.
composer require waryor/desensitizeRegister 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");The MIT License (MIT). Please see License File for more information.