Laravel Responses: Redirects
Route::post('user/profile', function () {
// Validate the request...
return back()->withInput();
}); Redirect responses are instances of the Illuminate\Http\RedirectResponse class, and contain the proper headers needed to redirect the user to another URL.
Redirecting To Named Routes
// For a route with the following URI: profile/{id}
return redirect()->route('profile', ['id' => 1]); To generate a RedirectResponse to a named route, you may use the route method.
If your route has parameters, you may pass them as the second argument to the route method.
Semantic portal