// Laravel 5
return redirect()->back()->withInput();
// Laravel 6,7, 8
return back()->withInput();
Route::post('user/profile', function () {
// Update the user's profile...
return redirect('dashboard')->with('status', 'Profile updated!');
});
// class ExampleRequest
public function response(array $errors): RedirectResponse
{
return Redirect::back()->withErrors($errors)->withInput();
}
return redirect()->back()->withInput();
return back()->withInput($request->except('answer'))->withError('je antwoord is niet correct!');