Constrain accessory by category ID if one is passed

This commit is contained in:
snipe 2017-11-14 16:47:21 -08:00
parent 498fc3762d
commit ba38b841cb

View file

@ -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'));
}