I have the following route:
Route::get('FinDraT/efectivoxpuesto/{id}/index','EfectivoxPuestoController@index');
and in the controller function I do:
return redirect()->route('FinDraT/efectivoxpuesto/'. $id.'/index');
And it throws me the error that the route is not defined.
You are trying to redirect to a URL via a method that uses the names of those routes.
In your case it would be:
If you want to use the method
route()
, you'll need to give your route a name (which I recommend):in controller:
More information in the Laravel documentation:
https://laravel.com/docs/5.3/redirects#redirecting-named-routes