From 72ec362f725ed2929fbf415db60e83842f39cbd3 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 8 Feb 2017 03:37:44 -0800 Subject: [PATCH] Search on status label type --- app/Http/Controllers/Api/AssetsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index fb3839640e..9bffe3aa52 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -49,7 +49,7 @@ class AssetsController extends Controller * @since [v4.0] * @return JsonResponse */ - public function index(Request $request, $status = null) + public function index(Request $request) { $this->authorize('index', Asset::class); @@ -116,7 +116,7 @@ class AssetsController extends Controller $sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'assets.created_at'; $assets->orderBy($sort, $order); - switch ($status) { + switch ($request->input('status')) { case 'Deleted': $assets->withTrashed()->Deleted(); break;