Package Data | |
---|---|
Maintainer Username: | ZedoX |
Maintainer Contact: | ziyaan2010@gmail.com (Ziyaan Hassan) |
Package Create Date: | 2022-04-25 |
Package Last Update: | 2025-01-08 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-01-08 15:10:47 |
Package Statistics | |
---|---|
Total Downloads: | 202,010 |
Monthly Downloads: | 11,162 |
Daily Downloads: | 458 |
Total Stars: | 303 |
Total Watchers: | 4 |
Total Forks: | 45 |
Total Open Issues: | 3 |
Configurable activity logger for filament.
Powered by spatie/laravel-activitylog
You can choose what you want to log and how to log it.
Note: By default this package will log Filament Resource Events, Access(Login) Events, and Notification Events. If you want to log a model that is not a FilamentResource you will have to manually register in the config file.
This package uses spatie/laravel-activitylog, instructions for its setup can be found here
You can install the package via composer:
composer require z3d0x/filament-logger
After that run the install command:
php artisan filament-logger:install
This will publish the config & migrations from spatie/laravel-activitylog
To enforce policies on ActivityResource
, after generating a policy, you would need to register Spatie\Activitylog\Models\Activity
to use that policy in the AuthServiceProvider.
<?php
namespace App\Providers;
use App\Policies\ActivityPolicy;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Spatie\Activitylog\Models\Activity;
class AuthServiceProvider extends ServiceProvider
{
protected $policies = [
// Update `Activity::class` with the one defined in `config/activitylog.php`
Activity::class => ActivityPolicy::class,
];
//...
}
If you are using Shield just register the ActivityPolicy generated by it
The main Activity
class being used by the Filament Resource instance will be resolved by Spatie's service provider, which loads the model defined by the configuration key found at activitylog.activity_model
in config/activitylog.php
.
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.