承接 pxlrbt/filament-activity-log 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

pxlrbt/filament-activity-log

最新稳定版本:v2.0.2

Composer 安装命令:

composer require pxlrbt/filament-activity-log

包简介

Spatie's Laravel Activity Log integrated into Filament

README 文档

README

header

Filament Activity Log

Latest Version on Packagist Software License GitHub Workflow Status Total Downloads

This package adds a page to the Filament Admin panel to view the activity log generated by spatie/laravel-activitylog.

Screenshot

Installation

Plugin Version Filament Version PHP Version
0.1.x 2.x > 8.0
1.x 3.x > 8.1
2.x 4.x > 8.1

Install via Composer.

Requires PHP 8.0 and Filament 2.0

composer require pxlrbt/filament-activity-log

Warning This plugin only offers a page to show activities related to your model. You need spatie/laravel-activitylog installed and configured for it to work. It is important you are using the LogsActivity trait as per Spatie's docs for this work as we use the '->activities()' method of the trait.

Filament v4 Upgrade

Make sure you have a custom theme, add this line and recompile: @import '../../../../vendor/pxlrbt/filament-activity-log/resources/css/styles.css';

Usage

Make sure you use a custom theme and the vendor folder for this plugins is published, so that it includes the Tailwind CSS classes.

Create a page

Create the page inside your resources Pages/ directory. Replace OrderResource with your resource.

<?php

namespace App\Filament\Resources\OrderResource\Pages;

use pxlrbt\FilamentActivityLog\Pages\ListActivities;

class ListOrderActivities extends ListActivities
{
    protected static string $resource = OrderResource::class;
}

Register the page

Add the page to your resource's getPages() method.

public static function getPages(): array
{
    return [
        'index' => Pages\ListOrders::route('/'),
        'create' => Pages\CreateOrder::route('/create'),
        'activities' => Pages\ListOrderActivities::route('/{record}/activities'),
        'edit' => Pages\EditOrder::route('/{record}/edit'),
    ];
}

Link to your page

Use a Filament action to link to your from your table or page.

$table->actions([
    Action::make('activities')->url(fn ($record) => YourResource::getUrl('activities', ['record' => $record]))
]);

Adjust your model to log activities

class Order extends Model
{
    use LogsActivity;
}

See https://spatie.be/docs/laravel-activitylog/v4/advanced-usage/logging-model-events for more information on the topic.

Contributing

If you want to contribute to this packages, you may want to test it in a real Filament project:

  • Fork this repository to your GitHub account.
  • Create a Filament app locally.
  • Clone your fork in your Filament app's root directory.
  • In the /filament-activity-log directory, create a branch for your fix, e.g. fix/error-message.

Install the packages in your app's composer.json:

"require": {
    "pxlrbt/filament-activity-log": "dev-fix/error-message as main-dev",
},
"repositories": [
    {
        "type": "path",
        "url": "filament-activity-log"
    }
]

Now, run composer update.

统计信息

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

GitHub 信息

  • Stars: 209
  • Watchers: 5
  • Forks: 38
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04