From 85974c7f6586d30617fff4886a952f4ed8135001 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 18 May 2023 13:16:52 -0700 Subject: [PATCH] Apply formatting --- app/Models/User.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 8f5946a65c..852851a771 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -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}%"] + ); } /**