From b9f72a2afacbc2e1663ecdca2fbf3a355fd95334 Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Wed, 22 Jun 2016 12:53:27 -0400 Subject: [PATCH] Flash errors to session on edit as well. --- app/Http/Controllers/AssetsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 60826ff86f..9788b3d46c 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -417,8 +417,8 @@ class AssetsController extends Controller \Session::flash('success', trans('admin/hardware/message.update.success')); return response()->json(['redirect_url' => route("view/hardware", $assetId)]); } - - return response()->json(['errors' => $asset->getErrors()]); + \Session::flash('errors', $asset->getErrors()); + return response()->json(['errors' => $asset->getErrors()], 500); }