return Redirect::back()->withErrors(['msg', 'The Message']);
and inside your view call this
@if($errors->any())
<h4>{{$errors->first()}}</h4>
@endif
// Laravel 5
return redirect()->back()->withInput();
// Laravel 6,7, 8
return back()->withInput();
return back();
return redirect()->back();
return redirect()->previous();
// redirect to a route/url with session message
return redirect()->route('home')->with('message', 'Your message');
// class ExampleRequest
public function response(array $errors): RedirectResponse
{
return Redirect::back()->withErrors($errors)->withInput();
}
return redirect()->back()->with('message','Action completed Successfully');
return back()->withInput();