F
Filamentβ€’11mo ago
bdm-laravel

'Filament\Resources\Pages\ListRecords\Tab' is deprecated

Need alternative for Tab in filament This is the code public function getTabs(): array { return [ 'All' => Tab::make(), 'This Week' => Tab::make() ->modifyQueryUsing(fn (Builder $query) => $query->where('date_hired', '>=', now()->subWeek())) ->badge(Employee::query()->where('date_hired', '>=', now()->subWeek())->count()), 'This Month' => Tab::make() ->modifyQueryUsing(fn (Builder $query) => $query->where('date_hired', '>=', now()->subMonth())) ->badge(Employee::query()->where('date_hired', '>=', now()->subMonth())->count()), 'This Year' => Tab::make() ->modifyQueryUsing(fn (Builder $query) => $query->where('date_hired', '>=', now()->subYear())) ->badge(Employee::query()->where('date_hired', '>=', now()->subYear())->count()), ]; }πŸ™
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server