activity-timeline
activity-timeline copied to clipboard
[Bug]: ActivityDate is not formatted
What happened?
I use this package with spatie activity log. When trying to format the date, nothing happens. I'm using the default created_at column from activity_log table.
How to reproduce the bug
Simply use ActivityDate inside InfoBuilder:
ActivityDate::make('created_at')->date('F j, Y'),
Package Version
1.2.9
PHP Version
8.2
Laravel Version
11.32.0
Which operating systems does with happen with?
macOS
Notes
No response
Looks like the getDate function was removed in this commit
@ezalorpro Thank you for the hint. This fixed it for me:
ActivityDate::make('created_at')->modifyState(fn (Carbon $state) => str($state->format('d.m.Y H:i:s'))->toHtmlString()),
This may be related.