📅  最后修改于: 2022-03-11 14:54:28.400000             🧑  作者: Mango
$validator = Validator::make($request->all(), [
'name' => 'required',
]);
if ($validator->fails()) {
return redirect()->to(url()->previous() . '#section')->withErrors($validator)->withInput();
}