cities search

This commit is contained in:
Benjamin Takats
2023-01-15 18:20:55 +01:00
parent ae21cbaf13
commit 618d2bd235

View File

@@ -44,7 +44,7 @@ class CityTable extends DataTableComponent
$columns = collect([ $columns = collect([
Column::make("Stadt Name", "name") Column::make("Stadt Name", "name")
->sortable() ->sortable()
->searchable(), ->searchable(fn($builder, $term) => $builder->where('cities.name', 'ilike', '%'.$term.'%')),
]); ]);
if ($this->type === 'school') { if ($this->type === 'school') {
$columns = $columns->merge([ $columns = $columns->merge([