diff --git a/src/Actions/CommentsAction.php b/src/Actions/CommentsAction.php index 5112c20..d1588e9 100644 --- a/src/Actions/CommentsAction.php +++ b/src/Actions/CommentsAction.php @@ -22,7 +22,7 @@ protected function setUp(): void ->hiddenLabel() ->icon(config('filament-comments.icons.action')) ->color('gray') - ->badge($this->record->filamentComments()->count()) + ->badge(fn (Model $record): int => $record->filamentComments()->count()) ->slideOver() ->modalContentFooter(fn (): View => view('filament-comments::component')) ->modalHeading(__('filament-comments::filament-comments.modal.heading'))