From 2f59bb74cdb35a7aea7829ff74a3dfa64b0672d7 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 18 Jun 2024 09:52:41 +0100 Subject: [PATCH] =?UTF-8?q?Prefaced=20fields=20with=20=E2=80=9Cusers?= =?UTF-8?q?=E2=80=9D=20for=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: snipe --- app/Models/User.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index e2e7f7eeee..438f432c56 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -827,16 +827,16 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo return $query->where('location_id','=', $location) - ->where('first_name', 'LIKE', '%' . $search . '%') - ->orWhere('email', 'LIKE', '%' . $search . '%') - ->orWhere('last_name', 'LIKE', '%' . $search . '%') - ->orWhere('permissions', 'LIKE', '%' . $search . '%') - ->orWhere('country', 'LIKE', '%' . $search . '%') - ->orWhere('phone', 'LIKE', '%' . $search . '%') - ->orWhere('jobtitle', 'LIKE', '%' . $search . '%') - ->orWhere('employee_num', 'LIKE', '%' . $search . '%') - ->orWhere('username', 'LIKE', '%' . $search . '%') - ->orwhereRaw('CONCAT(first_name," ",last_name) LIKE \''.$search.'%\''); + ->where('users.first_name', 'LIKE', '%' . $search . '%') + ->orWhere('users.email', 'LIKE', '%' . $search . '%') + ->orWhere('users.last_name', 'LIKE', '%' . $search . '%') + ->orWhere('users.permissions', 'LIKE', '%' . $search . '%') + ->orWhere('users.country', 'LIKE', '%' . $search . '%') + ->orWhere('users.phone', 'LIKE', '%' . $search . '%') + ->orWhere('users.jobtitle', 'LIKE', '%' . $search . '%') + ->orWhere('users.employee_num', 'LIKE', '%' . $search . '%') + ->orWhere('users.username', 'LIKE', '%' . $search . '%') + ->orwhereRaw('CONCAT(users.first_name," ",users.last_name) LIKE \''.$search.'%\'');