mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Update scopeAssignedSearch in Asset
This commit is contained in:
parent
2d86c8f030
commit
64e83ed9f5
|
@ -1348,7 +1348,13 @@ class Asset extends Depreciable
|
|||
})->orWhere(function ($query) use ($search) {
|
||||
$query->where('assets_users.first_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets_users.last_name', 'LIKE', '%'.$search.'%')
|
||||
->orWhereRaw('CONCAT('.DB::getTablePrefix().'assets_users.first_name," ",'.DB::getTablePrefix().'assets_users.last_name) LIKE ?', ["%$search%"])
|
||||
->orWhereRaw(
|
||||
$this->buildMultipleColumnSearch([
|
||||
DB::getTablePrefix().'assets_users.first_name',
|
||||
DB::getTablePrefix().'assets_users.last_name',
|
||||
]),
|
||||
["%{$search}%"]
|
||||
)
|
||||
->orWhere('assets_users.username', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assets_locations.name', 'LIKE', '%'.$search.'%')
|
||||
->orWhere('assigned_assets.name', 'LIKE', '%'.$search.'%');
|
||||
|
|
Loading…
Reference in a new issue