In a controller I'm calling the redirect helper to change the page with a named route, and i need to pass a parameter to it.
Base on the laravel documentation I did this:
return redirect()->route('named.route', ['id_element' => 1]);
Which should return page/{id_element}
according to the documentation
But is actually doing page?id_element=1
Since I'm using page/{id_element}
in the router it returns an error saying that there is no route to support it.
May I be doing something wrong? What is it?
I'm using Laravel 6.x