0

In earlier versions of Laravel, php artisan route:list gave you a tabular list of all the tabular list that showed you all routes and their middlewares. In Laravel I miss this information. In my case i protect users with the auth:sanctum middleware.

Route::middleware('auth:sanctum')->get(..)

in Laravel9

root@q123:/var/www/html# php artisan route:list

  GET|HEAD   /
  ...........................................................................................................................
  
  POST       _ignition/execute-solution ....................
  ignition.executeSolution › Spatie\LaravelIgnition ›
  ExecuteSolutionController
  GET|HEAD   _ignition/health-check ................................
  ignition.healthCheck › Spatie\LaravelIgnition › HealthCheckController
  POST       _ignition/update-config .............................
  ignition.updateConfig › Spatie\LaravelIgnition › UpdateConfigController
  GET|HEAD   api/profile
  .................................................................................................................
  
  GET|HEAD   api/user
  ....................................................................................................................
  
  GET|HEAD   sanctum/csrf-cookie .......................................
  sanctum.csrf-cookie › Laravel\Sanctum › CsrfCookieController@show
  GET|HEAD   v1/api/areas
  ................................................................................................................
  
  GET|HEAD   v1/api/parcel
  ...............................................................................................................
  

                                                                                                                        Showing [9] routes

How can I have this displayed again?

Maik Lowrey
  • 15,957
  • 6
  • 40
  • 79
  • 1
    https://laravel.com/docs/9.x/routing#the-route-list "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" – ceejayoz Nov 28 '22 at 13:19
  • @ceejayoz Thanks for you fast comment! If you will publish a short answer it would be accepted. Thank you!!! – Maik Lowrey Nov 28 '22 at 13:21
  • Does this answer your question? [Laravel 9 route:list middleware](https://stackoverflow.com/questions/71448710/laravel-9-routelist-middleware) – OMi Shah Nov 29 '22 at 04:33

1 Answers1

1

php artisan route:list -v

should work

lagbox
  • 48,571
  • 8
  • 72
  • 83