mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 12:17:05 -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)
|
public function scopeSimpleNameSearch($query, $search)
|
||||||
{
|
{
|
||||||
$query = $query->where('first_name', 'LIKE', '%'.$search.'%')
|
return $query->where('first_name', 'LIKE', '%' . $search . '%')
|
||||||
->orWhere('last_name', 'LIKE', '%'.$search.'%')
|
->orWhere('last_name', 'LIKE', '%' . $search . '%')
|
||||||
->orWhereRaw(
|
->orWhereRaw(
|
||||||
$this->buildMultipleColumnSearch([
|
$this->buildMultipleColumnSearch([
|
||||||
DB::getTablePrefix() . 'users.first_name',
|
DB::getTablePrefix() . 'users.first_name',
|
||||||
DB::getTablePrefix() . 'users.last_name',
|
DB::getTablePrefix() . 'users.last_name',
|
||||||
]),
|
]),
|
||||||
["%{$search}%"]
|
["%{$search}%"]
|
||||||
);
|
);
|
||||||
|
|
||||||
return $query;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue