Answers for "how to change laravel validation redirect"

PHP
2

redirect on validation error laravel to specific section laravel

$validator = Validator::make($request->all(), [
  'name' => 'required',
]);

if ($validator->fails()) {
  return redirect()->to(url()->previous() . '#section')->withErrors($validator)->withInput();
}
Posted by: Guest on July-10-2021

Code answers related to "how to change laravel validation redirect"

Browse Popular Code Answers by Language