From ee4b8f4694972d4b4eefa6a2857bba1bfec20606 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 18 Jan 2023 13:03:31 -0800 Subject: [PATCH] Added byod to API controller Signed-off-by: snipe --- app/Http/Controllers/Api/AssetsController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 21e393bb89..dae0d8c22b 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -100,6 +100,7 @@ class AssetsController extends Controller 'checkout_counter', 'checkin_counter', 'requests_counter', + 'byod', ]; $filter = []; @@ -189,6 +190,10 @@ class AssetsController extends Controller $assets->ByDepreciationId($request->input('depreciation_id')); } + if ($request->filled('byod')) { + $assets->ByDepreciationId($request->input('byod')); + } + $request->filled('order_number') ? $assets = $assets->where('assets.order_number', '=', e($request->get('order_number'))) : ''; // Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which