Skip to content

Commit f50443c

Browse files
committed
Fixes comment count
1 parent 7533d7d commit f50443c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `filament-comments` will be documented in this file.
44

5+
# 1.5.1 - March 27, 2025
6+
7+
- Fixes comment count in action
8+
59
# 1.5.0 - March 27, 2025
610

711
- Adds Laravel 12 support (Credit [@CodeWithDennis](https://github.com/CodeWithDennis))

src/Actions/CommentsAction.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected function setUp(): void
2222
->hiddenLabel()
2323
->icon(config('filament-comments.icons.action'))
2424
->color('gray')
25-
->badge(fn (Model $record): int => $record->filamentComments()->count())
25+
->badge($this->record?->filamentComments()->count())
2626
->slideOver()
2727
->modalContentFooter(fn (): View => view('filament-comments::component'))
2828
->modalHeading(__('filament-comments::filament-comments.modal.heading'))

0 commit comments

Comments
 (0)