From 618d2bd23564c0132fb10557cf919b3aa1fe3311 Mon Sep 17 00:00:00 2001 From: Benjamin Takats Date: Sun, 15 Jan 2023 18:20:55 +0100 Subject: [PATCH] cities search --- app/Http/Livewire/Tables/CityTable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Livewire/Tables/CityTable.php b/app/Http/Livewire/Tables/CityTable.php index 2337d286..b52b61c3 100644 --- a/app/Http/Livewire/Tables/CityTable.php +++ b/app/Http/Livewire/Tables/CityTable.php @@ -44,7 +44,7 @@ class CityTable extends DataTableComponent $columns = collect([ Column::make("Stadt Name", "name") ->sortable() - ->searchable(), + ->searchable(fn($builder, $term) => $builder->where('cities.name', 'ilike', '%'.$term.'%')), ]); if ($this->type === 'school') { $columns = $columns->merge([