mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 04:03:34 -08:00
Apply formatting
This commit is contained in:
parent
ffbde46180
commit
85974c7f65
|
@ -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}%"]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue