Laravel route redirect not working

Created at 09-Aug-2021 , By samar

Laravel route redirect not working

In this article, we will see how to solve "Laravel route redirect not working".

You can redirect to a route with the redirect helper method in Laravel. You can change the route name as per your requirements.
  • Redirect to login route in laravel

    return redirect()->route('login');
  • Redirect route with parameters

    return redirect()->route('profile', ['id' => 1]);

    You can use this code snippet to your controller's method after performing some tasks. It will redirect to the profile route with parameter (id) value 1.

Back to code snippet queries related laravel

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.