Flash errors to session on edit as well.

This commit is contained in:
Daniel Meltzer 2016-06-22 12:53:27 -04:00
parent 560115e758
commit b9f72a2afa

View file

@ -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);
} }