A
A
Abc Edc2015-09-08 20:35:41
Laravel
Abc Edc, 2015-09-08 20:35:41

Is there a method for taking route names in laravel?

\Route::getRoutes()//Тут есть протектед свойство
\Route::getRoutes()->getRoutes()//Тут список урлов

And you need a list of route names, a method,
or some other possibility of taking

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
D', 2015-09-08
@gleber1

foreach (Route::getRoutes() as $route) {
  echo $route->getName();
}

Если правильно понял.
getRoutes возвращает RouteCollection, который содержит роуты

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question