diff --git a/app/Http/Controllers/Api/AccessoriesController.php b/app/Http/Controllers/Api/AccessoriesController.php index 3a1857b9a6..8590accfd4 100644 --- a/app/Http/Controllers/Api/AccessoriesController.php +++ b/app/Http/Controllers/Api/AccessoriesController.php @@ -34,6 +34,10 @@ class AccessoriesController extends Controller $accessories->where('company_id','=',$request->input('company_id')); } + if ($request->has('category_id')) { + $accessories->where('category_id','=',$request->input('category_id')); + } + if ($request->has('manufacturer_id')) { $accessories->where('manufacturer_id','=',$request->input('manufacturer_id')); }