Question : laravel redirect back
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
Question : laravel redirect back with input
Answered by : snippets
// Laravel 5
return redirect()->back()->withInput();
// Laravel 6,7, 8
return back()->withInput();
Source : | Last Update : Sun, 12 Sep 21
Question : laravel redirect back with errors and input
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
Question : redirect back with input laravel in request
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