Return redirect laravel not working

Updated at 03-Sep-2021, By samar

Return redirect laravel not working

Hello everyone, in this post we will examine how to solve the "Return redirect laravel not working" programming puzzle.

Sometimes we want to redirect to user on a specific URL on visit a URL. There could be any problem in your project, If return redirect is not working. You can use provided code snippet to solve the problem
  • Redirect to URL in laravel using redirect helper

    --PATH routes\web.php
    Route::get('/dashboard', function () {
        return redirect('/home/dashboard');
    });
    

    This code snippet will help you to redirect to another URL (home/dashboard) on visit /dashboard URL. It will redirect to you to http://localhost:8000/home/dashboard on visit http://localhost:8000/dashboard URL in your laravel project.

Back to code snippet queries related laravel