Learn how to get route list in lumen as like as laravel
thedevsaddam wrote a nice package that we can use to display all the registered route list like laravel.
Lumen Route List
This package will help to display all the registered route list like laravel.
$ composer require thedevsaddam/lumen-route-list
Install manually (add the line to composer.json file)
Then open your terminal and hit the command
Open bootstrap/app.php and add the line below
php artisan route:listto display the route list
- Inorder to filter routes use
php artisan route:list --filter=tableHeaderName:searchKeyword
- To display in reverse order use
Filtering example given below:
php artisan route:list --filter=method:post #The above example will filter all the routes with post method# or php artisan route:list --filter=name:user #The above example will filter all the routes which name contains *user* keyword# or to display in reverse order use php artisan route:list --filter=name:user --reverse
Thank you :)
This post is submitted by one of our members. You may submit a new post here.