badge(); $this->color('warning'); $this->icon('heroicon-o-hand-raised'); $this->placeholder('—'); $this->state(fn (Model $record): ?string => $record->isAwaitingReview() ? __('panel.reviews.waiting') : null); // Who it is waiting for, since that is the next question anybody asks // — and "anybody" is a real answer rather than a missing one. $this->description(function (Model $record): ?string { if (! $record->isAwaitingReview()) { return null; } return $record->reviewer?->name ?? __('panel.reviews.anyone'); }); $this->tooltip(fn (Model $record): ?string => $record->isAwaitingReview() ? $record->review_requested_at?->diffForHumans() : null); $this->sortable(query: fn ($query, string $direction) => $query ->orderBy('review_requested_at', $direction)); } }