I was hoping to find a way to create an array with the registered routes paths within Laravel 4.
Essentially, I am looking to get a list something like this returned:
/
/login
/join
/password
I did come across a method Route::getRoutes()
which returns an object with the routes information as well as the resources but the path information is protected and I don't have direct access to the information.
Is there any other way to achieve this? Perhaps a different method?
Console command for those who use Oh-my-zsh with Laravel 5 plugin
A better way to get it readable is to register a route and print it in web browser with the artisan output directly
Code
Laravel <= 5.3
Laravel >= 5.4
Artisan
Laravel 4
Laravel 5
For Laravel 5.4.* This code works fine.