mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 05:47:28 -08:00
Flash input on model validation errors when creating/editing assets.
This commit is contained in:
parent
b9f72a2afa
commit
f6d47887c4
|
@ -254,6 +254,7 @@ class AssetsController extends Controller
|
|||
\Session::flash('success', trans('admin/hardware/message.create.success'));
|
||||
return response()->json(['redirect_url' => route('hardware')]);
|
||||
}
|
||||
\Input::flash();
|
||||
\Session::flash('errors', $asset->getErrors());
|
||||
return response()->json(['errors' => $asset->getErrors()], 500);
|
||||
}
|
||||
|
@ -417,6 +418,7 @@ class AssetsController extends Controller
|
|||
\Session::flash('success', trans('admin/hardware/message.update.success'));
|
||||
return response()->json(['redirect_url' => route("view/hardware", $assetId)]);
|
||||
}
|
||||
\Input::flash();
|
||||
\Session::flash('errors', $asset->getErrors());
|
||||
return response()->json(['errors' => $asset->getErrors()], 500);
|
||||
|
||||
|
|
Loading…
Reference in a new issue