定制 unknow-sk/filament-logger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

unknow-sk/filament-logger

最新稳定版本:1.0.0

Composer 安装命令:

composer require unknow-sk/filament-logger

包简介

Activity logger for filament

README 文档

README

╔═══════════════════════════════════════════════════════════╗
║  ⚠️  THIS PACKAGE IS INACTIVE AND NO LONGER SUPPORTED  ⚠️ ║
║                                                           ║
║  Please migrate to the new package:                      ║
║  👉 https://github.com/Jacobtims/filament-logger         ║
╚═══════════════════════════════════════════════════════════╝

What You Won't Get:

  • ❌ New features
  • ❌ Bug fixes
  • ❌ Security updates
  • ❌ Updates for new Laravel/Filament versions

Migrate immediately to: Jacobtims/filament-logger

This package fork of z3d0x/filament-logger but with support for Filament v4+.

Activity logger for filament

Latest Version on Packagist Total Downloads

Configurable activity logger for filament. Powered by spatie/laravel-activitylog

Features

You can choose what you want to log and how to log it.

  • Log Filament Resource Events
  • Log Login Event
  • Log Notification Events
  • Log Model Events
  • Easily extendable to log custom events

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.

Installation

Plugin Version Filament Version
< 0.5.x ^2.11
>= 0.6.0 3.x
>= 1.0.0 4.x

This package uses spatie/laravel-activitylog, instructions for its setup can be found here

You can install the package via composer:

composer require unknow-sk/filament-logger

After that run the install command:

php artisan filament-logger:install

This will publish the config & migrations from spatie/laravel-activitylog

For Filament v3, you need to register a resource in PanelProvider

public function panel(Panel $panel): Panel
{
    return $panel
        ->resources([
            config('filament-logger.activity_resource')
        ]);
}

Authorization

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

Translations

Publish the translations using:

php artisan vendor:publish --tag="filament-logger-translations"

Activity Model resolution

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.

Screenshots

logger-index

logger-detail-1

logger-detail-2

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.

统计信息

  • 总下载量: 2.64k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 73
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-18