redirect to route laravel

Solutions on MaxInterview for redirect to route laravel by the best coders in the world

showing results for - "redirect to route laravel"
Nicolò
03 May 2018
1Route::redirect('/here', '/there');
2or
3return redirect(route('register'));
Alberto
24 Jun 2016
1return redirect()->route('login');
Raoul
15 Nov 2019
1path = "{{route('dashboard')}}";
2window.location.href = path;
Roberta
25 Feb 2020
11. The cleanest way seems to be using the url() helper:
2	{{ url()->previous() }}
3
42. URL::previous() works for me in my Laravel 5.1 project. Here is Laravel 5.1 
5  doc for previous() method, which is accessible through URL Facade.
6
73. You can still try alternatives, in your views you can do:
8
9	{{ redirect()->getUrlGenerator()->previous() }}
10						OR
11	{{ redirect()->back()->getTargetUrl() }}
Maelly
23 Jul 2019
1Route::post('/user/profile', function () {
2    // Update the user's profile...
3
4    return redirect('/dashboard')->with('status', 'Profile updated!');
5});
Charlotte
09 Jun 2020
1// For a route with the following URI: profile/{id}
2
3return redirect()->route('profile', [$user]);
similar questions
queries leading to this page
redirect to route laravel