diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 1f2f9865ff..2f44ac7965 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -112,7 +112,7 @@ class AssetsController extends Controller } if ($request->has('location_id')) { - $assets->ByLocationId($request->input('location_id')); + $assets->where('assets.location_id', '=', $request->input('location_id')); } if ($request->has('supplier_id')) {