Skip to content

Commit

Permalink
new: formatDescriptionUsing
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinosswald committed Nov 21, 2023
1 parent 0030e25 commit 70e4de9
Show file tree
Hide file tree
Showing 4 changed files with 550 additions and 46 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ php artisan vendor:publish --tag="filament-activity-log-views"
```php
ActivityLogEntry::make()
->with('shippingAddress.activities')
->formatDescriptionUsing(fn(Activity $activity) => $activity->description)
->formatSubjectUsing(function (Activity $activity) {
if ($activity->subject_type == OrderAddress::class) {
return __("models.{$activity->subject_type}", ['type' => $activity->subject->type]);
Expand Down
Loading

0 comments on commit 70e4de9

Please sign in to comment.