mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Add query to search default locations in advanced search
This commit is contained in:
parent
b81c6825cf
commit
b607a59875
|
@ -1433,6 +1433,12 @@ class Asset extends Depreciable
|
|||
});
|
||||
}
|
||||
|
||||
if ($fieldname == 'rtd_location') {
|
||||
$query->whereHas('defaultLoc', function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%'.$search_val.'%');
|
||||
});
|
||||
}
|
||||
|
||||
if ($fieldname =='assigned_to') {
|
||||
$query->whereHasMorph('assignedTo', [User::class], function ($query) use ($search_val) {
|
||||
$query->where(function ($query) use ($search_val) {
|
||||
|
|
Loading…
Reference in a new issue