Laravel makes adding a new route a piece of cake ๐Ÿ˜Ž. To view all the routes we have been using php artisan route:list and this list becomes quite messy and hard to read as the route keeps growing.

Image path for route list

Some of the common options

Using path and name options

1
2
3
php artisan route:list --path="login"

php artisan route:list --name="login"

Image path for route list with options

–compact flag

1
php artisan route:list --compact

This command shows only Method, URI and Action.

Using compact flag

Specify columns

1
php artisan route:list --columns=Method,URI,Name,Middleware

Specify columns

This options and flags make the route list more readable.

๐Ÿบ Happy Coding!