View your Laravel routes on the browser.
This package adds a route to your Laravel application. Once you've installed this package, enter /route-list
path in the browser to see your route list.
laravel-routes-html.mov
The page also allows you to filter using the URI and Name.
Installation
You can install the package via composer:
composer require s-patompong/laravel-routes-html
You can publish the config file with:
php artisan vendor:publish --tag="routes-html-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="routes-html-views"
This is the contents of the published config file:
return [
/**
* Either you want to enable or disable the route
* It should be enabled only in the local environment
* By default, it'll be enabled if the app.debug is true
*/
'enabled' => (bool) env('ROUTES_HTML_ENABLED', config('app.debug')),
/**
* The route URI
*/
'uri' => '/route-list',
/**
* The route name
*/
'route_name' => 'routes',
/**
* The list of route to ignore
*/
'ignore_routes' => [
'routes-html/*',
'_ignition/*',
'sanctum/*',
'livewire/*',
],
/**
* The list of middleware that you want
* the request to run through before hitting
* the /route-list route
*/
'middlewares' => [
// Example: uncomment the first line below
// to allow only the authenticated user
// to use the /route-list route
// \App\Http\Middleware\Authenticate::class
],
];
Usage
Open your Laravel application on the browser and go to /route-list
URL (or the URL that you put inside the routes-html.uri
).
Route Middlewares
To add middlewares to the request pipeline before it hits the /route-list
route. Add the middleware classname to the middlewares
key in the config file like so:
'middlewares' => [
\App\Http\Middleware\Authenticate::class
]
This will make sure that only the authenticated user can access the /route-list
route.
Testing
composer test
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.