marvinosswald/filament-activity-log

This is my package filament-activity-log

0.3.3 2023-12-01 10:21 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a Infolist Entry which displays log line from https://github.com/spatie/laravel-activitylog.

Installation

You can install the package via composer:

composer require marvinosswald/filament-activity-log

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-activity-log-views"

Usage

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]);
    }
    return __("models.{$activity->subject_type}");
})

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.