mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Pull out weird query scope that breaks stuff when querying large datasets
This commit is contained in:
parent
f4cdeaa956
commit
e088eea2f7
|
@ -152,11 +152,6 @@ class Accessory extends SnipeModel
|
|||
$query->whereHas('company', function ($query) use ($search) {
|
||||
$query->where('companies.name', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
})->orWhere(function ($query) use ($search) {
|
||||
$query->whereHas('assetlog', function ($query) use ($search) {
|
||||
$query->where('action_type', '=', 'checkout')
|
||||
->where('created_at', 'LIKE', '%'.$search.'%');
|
||||
});
|
||||
})->orWhere(function ($query) use ($search) {
|
||||
$query->whereHas('location', function ($query) use ($search) {
|
||||
$query->where('locations.name', 'LIKE', '%'.$search.'%');
|
||||
|
|
Loading…
Reference in a new issue