Answered by : indian-gooner
return Redirect::back()->withErrors(['msg', 'The Message']);
and inside your view call this
@if($errors->any())
<h4>{{$errors->first()}}</h4>
@endif
Source : | Last Update : Thu, 27 Aug 20
Answered by : snippets
// Laravel 5
return redirect()->back()->withInput();
// Laravel 6,7, 8
return back()->withInput();
Source : | Last Update : Sun, 12 Sep 21
Answered by : good-gecko-trrwc3l1e9k7
return back();
return redirect()->back();
return redirect()->previous();
Source : https://laracasts.com/discuss/channels/laravel/back-vs-redirect-back | Last Update : Tue, 31 Aug 21
Answered by : lennox-omondi
return redirect()->back()->withInput();
Source : https://stackoverflow.com/questions/31081644/how-to-redirect-back-to-form-with-input-laravel-5 | Last Update : Tue, 10 Nov 20
Answered by : mohammad-arman-ali
// redirect to a route/url with session message
return redirect()->route('home')->with('message', 'Your message');
Source : | Last Update : Fri, 29 Oct 21
Answered by : jrmew
// class ExampleRequest
public function response(array $errors): RedirectResponse
{ return Redirect::back()->withErrors($errors)->withInput();
}
Source : https://stackoverflow.com/questions/34598209/redirect-back-with-errors-and-input-in-custom-request-class-laravel-5 | Last Update : Tue, 26 Oct 21
Answered by : elegant-echidna-hujgm9zlnx9z
return back()->withInput();
Source : | Last Update : Wed, 10 Nov 21
Answered by : tiago-bordin
return redirect()->back()->with('message','Action completed Successfully');
Source : | Last Update : Tue, 04 Oct 22