Reputation: 12438
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?
Upvotes: 0
Views: 232
Reputation: 657
I think, you can get it in this way
Route::getRoutes()->getByName($name);
or
Route::getRoutes()->getByAction($action);
Upvotes: 1