thedevsaddam wrote a nice package that we can use to display all the registered route list like laravel.

lumen route list

Lumen Route List

This package will help to display all the registered route list like laravel.


Installation

Via Composer

$ composer require thedevsaddam/lumen-route-list

Install manually (add the line to composer.json file)

"thedevsaddam/lumen-route-list": "^1.0"

Then open your terminal and hit the command

composer update

Open bootstrap/app.php and add the line below

$app->register(\Thedevsaddam\LumenRouteList\LumenRouteListServiceProvider::class);

Uses

  1. Run php artisan route:list to display the route list
  2. Inorder to filter routes use php artisan route:list --filter=tableHeaderName:searchKeyword
  3. To display in reverse order use --reverse

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

route list like laravel

Thank you :)