like to ilike remove case sensitev

This commit is contained in:
Simon Pocrnjič 2024-11-22 09:37:35 +01:00
parent 77e0066ded
commit ee2681b9fb
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)