Laravel 5.5 – The Route::redirect method

/ By Arjun / Published on November 25, 2017

Laravel 5.5 introduced new Router class method called redirect, which gives the flexibility to redirect to other URLs directly without creating a controller or closure.

How to use Route::redirect()

Let’s define a route with Route::redirect() method, if user tries to access http://localhost:8000/contact page, redirect the user to http://locahost:8000/contact-us page.

The Route::redirect() is very useful method when you want to redirect to a specific URI by accessing another URI.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x