From f6d47887c4f41e0f3d8618efbd1bfae881e62f2c Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Wed, 22 Jun 2016 15:20:49 -0400 Subject: [PATCH] Flash input on model validation errors when creating/editing assets. --- app/Http/Controllers/AssetsController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 9788b3d46c..c3b72d7db1 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -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);