#Where to customize filter notif badge count
5 messages · Page 1 of 1 (latest)
Which filters are you using? I can't replicate with the demo
try filtersTriggerAction if you want to remove it
oh thx! I could also customize the label that way
Filter with Select in it like this
Filter::make('expired_in')
->label('Expired dalam')
->form([
Select::make('range')
->label('Expired dalam')
->options([
30 => '< 30 hari',
14 => '< 14 hari',
7 => '< 7 hari',
3 => '< 3 hari',
])
->native(false)
->columnSpan(1),
])
->query(function (Builder $query, array $data) {
$days = (int) ($data['range'] ?? 0);
if ($days <= 0) {
return $query;
}
$now = Carbon::today();
return $query
->whereNotNull('ended_at')
->whereDate('ended_at', '>=', $now)
->whereDate('ended_at', '<=', $now->copy()->addDays($days));
}),