PHPackages                             pxlrbt/filament-activity-log - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. pxlrbt/filament-activity-log

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

pxlrbt/filament-activity-log
============================

Spatie's Laravel Activity Log integrated into Filament

v3.1.1(2mo ago)230717.9k↓28.7%44[6 issues](https://github.com/pxlrbt/filament-activity-log/issues)[1 PRs](https://github.com/pxlrbt/filament-activity-log/pulls)7MITPHPPHP ^8.4CI passing

Since May 22Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/pxlrbt/filament-activity-log)[ Packagist](https://packagist.org/packages/pxlrbt/filament-activity-log)[ GitHub Sponsors](https://github.com/pxlrbt)[ RSS](/packages/pxlrbt-filament-activity-log/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (6)Versions (43)Used By (7)

[![header](./.github/resources/header.png)](./.github/resources/header.png)

Filament Activity Log
=====================

[](#filament-activity-log)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fb700b517158346c0d7e31a3e2353e747041cc05e1ecdf29a364f5e251cd0890/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70786c7262742f66696c616d656e742d61637469766974792d6c6f672e7376673f696e636c7564655f70726572656c6561736573)](https://packagist.org/packages/pxlrbt/filament-activity-log)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![GitHub Workflow Status](https://camo.githubusercontent.com/5d58737c9693cc5cce0235c977ea6b85c19fcd4cc262b185943148e1b10fb23a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70786c7262742f66696c616d656e742d61637469766974792d6c6f672f636f64652d7374796c652e796d6c3f6272616e63683d6d61696e266c6162656c3d436f64652532307374796c65267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5d58737c9693cc5cce0235c977ea6b85c19fcd4cc262b185943148e1b10fb23a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70786c7262742f66696c616d656e742d61637469766974792d6c6f672f636f64652d7374796c652e796d6c3f6272616e63683d6d61696e266c6162656c3d436f64652532307374796c65267374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/33549dcbda27058effa1a5d1808a9d58d8eae2d4b3342fa1ff0b4d7658d535ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70786c7262742f66696c616d656e742d61637469766974792d6c6f672e737667)](https://packagist.org/packages/pxlrbt/filament-activity-log)

This package adds pages to the Filament Admin panel to view the activity log generated by [`spatie/laravel-activitylog`](https://github.com/spatie/laravel-activitylog).

[![Screenshot](./.github/resources/screenshot.png)](./.github/resources/screenshot.png)

Installation
------------

[](#installation)

Plugin VersionFilament VersionActivitylogPHP Version0.1.x2.x4.x&gt; 8.01.x3.x4.x&gt; 8.12.x4.x, 5.x4.x&gt; 8.13.x5.x5.x&gt; 8.4Install via Composer.

**Requires PHP 8.1, Filament 4.0 or 5.0, and spatie/laravel-activitylog 4.7 or 5.0**

```
composer require pxlrbt/filament-activity-log
```

> **Warning**This plugin offers two pages: one listing activities **on a subject** (use `ListActivitiesBySubject`) and one listing activities **caused by** a record such as a user (use `ListActivitiesByCauser`). You need [`spatie/laravel-activitylog`](https://github.com/spatie/laravel-activitylog) installed and configured for it to work. The subject page uses the `LogsActivity` trait's `activitiesAsSubject()` relation; the causer page uses the `CausesActivity` trait's `activitiesAsCauser()` relation.

Filament v4 Upgrade
-------------------

[](#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
-----

[](#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.

Listing activities for a subject
--------------------------------

[](#listing-activities-for-a-subject)

[![Screenshot](./.github/resources/screenshot.png)](./.github/resources/screenshot.png)

Use `ListActivitiesBySubject` to show all activities recorded **on** a record (e.g. every change to an order).

### Setup spatie/laravel-activitylog

[](#setup-spatielaravel-activitylog)

Make sure your resource model uses the `LogsActivity` trait.

```
