0

Is it possible to get the details of a route by it's name like the controller and action name that it uses?

I went through the documentation and it only has such functionality listed for the current route i.e. current(), currentRouteAction() etc. Is it possible to get the detail of a route, action and controller to be specific, by it's alias/name?

Kamran Ahmed
  • 11,809
  • 23
  • 69
  • 101
  • maybe this anwer can help http://stackoverflow.com/questions/30046691/how-to-get-current-route-name-in-laravel-5/30052319#30052319 – Adnan Dec 19 '15 at 16:03
  • Nope, because everything there is related to the **current route** but what I want is not the current but a specific route by it's name. – Kamran Ahmed Dec 19 '15 at 16:07

1 Answers1

1

I think, you can get it in this way

Route::getRoutes()->getByName($name);

or

Route::getRoutes()->getByAction($action);

Kalhan.Toress
  • 21,683
  • 8
  • 68
  • 92
Nyan Lynn Htut
  • 657
  • 1
  • 8
  • 10