Answer the question
In order to leave comments, you need to log in
How to get an array of route parameters?
There is a route like this: {prefix}/{parent_slug}/{id}
You can either pass an array of the form to the controller somehow:
[
'prefix' => текущее значение данного элемента маршрута
'parent_slug' => текущее значение данного элемента маршрута
'id' => текущее значение данного элемента маршрута
]
Answer the question
In order to leave comments, you need to log in
since they are already available in the controller, why pass them?
public function method( Request $request ) {
$request->prefix;
$request->parent_slug;
$request->id;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question