mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 00:54:07 -08:00
Merge branch 'develop'
This commit is contained in:
commit
90bff709a4
|
@ -167,8 +167,7 @@ class Accessory extends SnipeModel
|
||||||
return $query->where(function ($query) use ($search) {
|
return $query->where(function ($query) use ($search) {
|
||||||
|
|
||||||
$query->whereHas('category', function ($query) use ($search) {
|
$query->whereHas('category', function ($query) use ($search) {
|
||||||
$query->where('categories.name', 'LIKE', '%'.$search.'%')
|
$query->where('categories.name', 'LIKE', '%'.$search.'%');
|
||||||
->where('categories.category_type', '=', 'accessory');
|
|
||||||
})->orWhere(function ($query) use ($search) {
|
})->orWhere(function ($query) use ($search) {
|
||||||
$query->whereHas('company', function ($query) use ($search) {
|
$query->whereHas('company', function ($query) use ($search) {
|
||||||
$query->where('companies.name', 'LIKE', '%'.$search.'%');
|
$query->where('companies.name', 'LIKE', '%'.$search.'%');
|
||||||
|
@ -179,8 +178,7 @@ class Accessory extends SnipeModel
|
||||||
});
|
});
|
||||||
})->orWhere('accessories.name', 'LIKE', '%'.$search.'%')
|
})->orWhere('accessories.name', 'LIKE', '%'.$search.'%')
|
||||||
->orWhere('accessories.model_number', 'LIKE', '%'.$search.'%')
|
->orWhere('accessories.model_number', 'LIKE', '%'.$search.'%')
|
||||||
->orWhere('accessories.order_number', 'LIKE', '%'.$search.'%')
|
->orWhere('accessories.order_number', 'LIKE', '%'.$search.'%');
|
||||||
->orWhere('accessories.purchase_cost', '=', $search);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue