mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Merge pull request #11651 from inietov/fixes/activity_report_search
Fixed Search in activity report for full name in relation
This commit is contained in:
commit
3ac84eab58
|
@ -162,6 +162,10 @@ trait Searchable
|
|||
$query->orWhere($table.'.'.$column, 'LIKE', '%'.$term.'%');
|
||||
}
|
||||
}
|
||||
// I put this here because I only want to add the concat one time in the end of the user relation search
|
||||
if($relation == 'user') {
|
||||
$query->orWhereRaw('CONCAT (users.first_name, " ", users.last_name) LIKE ?', ["%$term%"]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue