Redirect Routes
If you are defining a route that redirects to another URI, you may use the Route::redirect
method. This method provides a convenient shortcut so that you do not
have to define a full route or controller for performing a simple
redirect:
Route::redirect('/here', '/there');
By default, Route::redirect
returns a 302
status code. You may customize the status code using the optional third parameter:
Route::redirect('/here', '/there', 301);
You may use the Route::permanentRedirect
method to return a 301
status code:
Route::permanentRedirect('/here', '/there');