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.

Answers 2
  • 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