I am redirecting to a named route in Laravel 7 and instead of the route being redirected it returns the user to the previous page. Controller
return redirect()->route('NAMEDRoute')->with("Information", $information[0]);
web.php
Route::get('/x/y', "Controller@function")->name('NAMEDRoute');
This just returns me to the route I was on before, I have tested other routes that also work but the function that this calls is never called. There are no other routes that have the same name and this does use a middleware but the user is authenticated. Does redirecting affect authentication? Thanks
source https://stackoverflow.com/questions/68604729/laravel-redirect-never-reaches-intended-function
Comments
Post a Comment