mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Flash errors to session on edit as well.
This commit is contained in:
parent
560115e758
commit
b9f72a2afa
|
@ -417,8 +417,8 @@ class AssetsController extends Controller
|
||||||
\Session::flash('success', trans('admin/hardware/message.update.success'));
|
\Session::flash('success', trans('admin/hardware/message.update.success'));
|
||||||
return response()->json(['redirect_url' => route("view/hardware", $assetId)]);
|
return response()->json(['redirect_url' => route("view/hardware", $assetId)]);
|
||||||
}
|
}
|
||||||
|
\Session::flash('errors', $asset->getErrors());
|
||||||
return response()->json(['errors' => $asset->getErrors()]);
|
return response()->json(['errors' => $asset->getErrors()], 500);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue