Route Lists

 The Route Lists

The route:list Artisan command can easily provide an overview of all of the routes that are defined by your application:

php artisan route:list

Example:

php artisan route:list

O/P

-v:
By default, the route middleware that are assigned to each route will not be displayed in the route:list output; however, you can instruct Laravel to display the route middleware by adding the -v option to the command:

E.g:

php artisan route:list -v

O/P

--path=api

You may also instruct Laravel to only show routes that begin with a given URI:

E.g:

php artisan route:list --path=api
O/P

--except-vendor

In addition, you may instruct Laravel to hide any routes that are defined by third-party packages by providing the --except-vendor option when executing the route:list command:

php artisan route:list --except-vendor
O/P




--only-vendor:

Likewise, you may also instruct Laravel to only show routes that are defined by third-party packages by providing the --only-vendor option when executing the route:list command:

php artisan route:list --only-vendor
O/P



Comments