3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-05-12 17:45:31 +00:00

Change $request->has to $request->filled unilaterally

This commit is contained in:
snipe
2018-07-24 22:51:31 -07:00
parent 0714ac4248
commit 86c1f11bec
32 changed files with 234 additions and 234 deletions

View File

@ -27,15 +27,15 @@ class ConsumablesController extends Controller
->with('company', 'location', 'category', 'users', 'manufacturer')
);
if ($request->has('search')) {
if ($request->filled('search')) {
$consumables = $consumables->TextSearch(e($request->input('search')));
}
if ($request->has('company_id')) {
if ($request->filled('company_id')) {
$consumables->where('company_id','=',$request->input('company_id'));
}
if ($request->has('manufacturer_id')) {
if ($request->filled('manufacturer_id')) {
$consumables->where('manufacturer_id','=',$request->input('manufacturer_id'));
}