1return Redirect::back()->withErrors(['msg', 'The Message']);
2
3and inside your view call this
4
5@if($errors->any())
6<h4>{{$errors->first()}}</h4>
7@endif
1Route::post('user/profile', function () {
2 // Update the user's profile...
3
4 return redirect('dashboard')->with('status', 'Profile updated!');
5});
1//redirct to previous page with message at a specific setion :)
2return redirect(url()->previous() .'#comments')->with('success', 'Data Your Comment has been created successfully');
1// For a route with the following URI: profile/{id}
2
3return redirect()->route('profile', [$user]);
1// For a route with the following URI: profile/{id}
2
3return redirect()->route('profile', ['id' => 1]);