Apply formatting

This commit is contained in:
Marcus Moore 2023-05-18 13:16:52 -07:00
parent ffbde46180
commit 85974c7f65
No known key found for this signature in database

View file

@ -644,17 +644,15 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/
public function scopeSimpleNameSearch($query, $search)
{
$query = $query->where('first_name', 'LIKE', '%'.$search.'%')
->orWhere('last_name', 'LIKE', '%'.$search.'%')
->orWhereRaw(
$this->buildMultipleColumnSearch([
DB::getTablePrefix() . 'users.first_name',
DB::getTablePrefix() . 'users.last_name',
]),
["%{$search}%"]
);
return $query;
return $query->where('first_name', 'LIKE', '%' . $search . '%')
->orWhere('last_name', 'LIKE', '%' . $search . '%')
->orWhereRaw(
$this->buildMultipleColumnSearch([
DB::getTablePrefix() . 'users.first_name',
DB::getTablePrefix() . 'users.last_name',
]),
["%{$search}%"]
);
}
/**