From d66dd3ab2d4c4b8516babc0c808fd44774eb3d20 Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 7 May 2026 11:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0=20=D0=BA=D0=BB?= =?UTF-8?q?=D0=B8=D0=B5=D0=BD=D1=82=D0=B0=20=D0=BF=D0=BE=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D1=80=D1=83=20=D0=B2=20=D0=BF=D1=80=D0=BE=D0=B8?= =?UTF-8?q?=D0=B7=D0=B2=D0=BE=D0=BB=D1=8C=D0=BD=D0=BE=D0=BC=20=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=B0=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Livewire/ClientsTable.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Livewire/ClientsTable.php b/app/Livewire/ClientsTable.php index 360ffec..88aa2a4 100644 --- a/app/Livewire/ClientsTable.php +++ b/app/Livewire/ClientsTable.php @@ -120,9 +120,11 @@ function getClients() $searchString = mb_strtolower(trim($this->filter['search'])); // $clients->whereFullText(['name', 'phone', 'email', 'normalized_name', 'normalized_phone'], $searchString); $clients->where(function ($query) use ($searchString) { - $query->where('normalized_name', 'like', "%{$searchString}%") - ->orWhere('normalized_phone', 'like', "%{$this->normilizePhone($searchString)}%") - ->orWhere('email', 'like', "%{$searchString}%"); + $query->where('normalized_name', 'like', "%{$searchString}%"); + $query->orWhere('email', 'like', "%{$searchString}%", caseSensitive: false); + if ($phoneFormatted = $this->normilizePhone($searchString)) { + $query->orWhere('normalized_phone', 'like', "%{$phoneFormatted}%"); + } }); }