badge(); $this->placeholder('—'); $this->alignEnd(); $this->state(fn (Model $record): ?int => $record->recent_views > 0 ? (int) $record->recent_views : null); $this->color(fn (?int $state) => match (true) { $state === null => 'gray', $state >= 100 => 'success', default => 'info', }); $this->sortable(query: fn ($query, string $direction) => $query ->orderBy('recent_views', $direction)); } }