Constrain accessory by category ID if one is passed
This commit is contained in:
parent
498fc3762d
commit
ba38b841cb
1 changed files with 4 additions and 0 deletions
|
@ -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'));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue