From ee2681b9fb435b1dc41253f859821642876a4313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Pocrnji=C4=8D?= Date: Fri, 22 Nov 2024 09:37:35 +0100 Subject: [PATCH] like to ilike remove case sensitev --- app/Http/Controllers/ClientCaseContoller.php | 2 +- app/Http/Controllers/ClientController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ClientCaseContoller.php b/app/Http/Controllers/ClientCaseContoller.php index 8ba54fc..a4e1624 100644 --- a/app/Http/Controllers/ClientCaseContoller.php +++ b/app/Http/Controllers/ClientCaseContoller.php @@ -19,7 +19,7 @@ public function index(ClientCase $clientCase, Request $request) ->when($request->input('search'), fn($que, $search) => $que->whereHas( 'person', - fn($q) => $q->where('full_name', 'like', '%' . $search . '%') + fn($q) => $q->where('full_name', 'ilike', '%' . $search . '%') ) ) ->where('active', 1) diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index b7f0e28..e6b8b21 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -16,7 +16,7 @@ public function index(Client $client, Request $request){ ->when($request->input('search'), fn($que, $search) => $que->whereHas( 'person', - fn($q) => $q->where('full_name', 'like', '%' . $search . '%') + fn($q) => $q->where('full_name', 'ilike', '%' . $search . '%') ) ) ->where('active', 1)