Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Displaying registered routes in Laravel

Tags:

php

laravel

In this screencast: https://tutsplus.com/lesson/displaying-registered-routes/ Jeffrey Way demonstrates a command he created, and links to the github in the description. However there is an update to say that it is now baked into the Laravel 4 core, however I have searched for it to no avail.

The general idea is that is lists all routes and the action bind to them.

Any help would be appreciated.

like image 828
Jordan Avatar asked Apr 11 '13 17:04

Jordan


1 Answers

Console command:

php artisan routes (laravel 4)
php artisan route:list (laravel 5)


+--------+----------------------------------------------------+-----------------------+----------------------------------------------+--------------------------------------------------------------------+---------------+
| Domain | URI                                                | Name                  | Action                                       | Before Filters                                                     | After Filters |
+--------+----------------------------------------------------+-----------------------+----------------------------------------------+--------------------------------------------------------------------+---------------+
|        | GET /admin/configuration                           |                       | ConfigurationController@index                | auth, keyMaster:configuration                                      |               |
|        | POST /admin/configuration                          |                       | ConfigurationController@update               | auth, keyMaster:configuration                                      |               |
|        | GET /admin/logs/errors                             |                       | LogsController@errors                        | auth, keyMaster:logs/errors                                        |               |
|        | GET /admin/logs/errors/{name}                      |                       | LogsController@errors                        | auth, keyMaster:logs/errors                                        |               |
|        | DELETE /admin/logs/errors                          |                       | LogsController@delete                        | auth, keyMaster:logs/errors                                        |               |
|        | GET /admin/logs/events                             |                       | LogsController@events                        | auth, keyMaster:logs/events                                        |               |
|        | GET /admin/logs/events/data                        |                       | LogsController@eventsData                    | auth, keyMaster:logs/events                                        |               |

etc...

like image 113
Igor Parra Avatar answered Oct 20 '22 09:10

Igor Parra