Custom Builder
You can also define a custom builder for a filter. This is useful when you want to modify the query builder based on the filter's value.
Column::make('name', 'Name')
->setFilter(
TextFilter::make()
->setBuilder(function ($builder, $value) {
$builder->where('name', 'LIKE', "%{$value}%");
})
),
Last updated
Was this helpful?