PHPackages                             alizharb/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. alizharb/filament-activity-log

ActiveFilament-plugin[Logging &amp; Monitoring](/categories/logging)

alizharb/filament-activity-log
==============================

A powerful, feature-rich activity logging solution for FilamentPHP v4 &amp; v5 with timeline views, dashboard widgets, and revert actions.

v1.3.1(3mo ago)2326.6k↑19.2%14[4 issues](https://github.com/AlizHarb/filament-activity-log/issues)MITPHPPHP ^8.3CI passing

Since Dec 2Pushed 2mo agoCompare

[ Source](https://github.com/AlizHarb/filament-activity-log)[ Packagist](https://packagist.org/packages/alizharb/filament-activity-log)[ Docs](https://github.com/alizharb/filament-activity-log)[ GitHub Sponsors](https://github.com/sponsors/alizharb)[ RSS](/packages/alizharb-filament-activity-log/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (12)Versions (10)Used By (0)

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

[](#-filament-activity-log)

 [![Filament Activity Log](https://camo.githubusercontent.com/4c387141078fc85db5a307f7965cfa6caecc23d7776fa0429f89b2f9e0a9deda/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e7425323041637469766974792532304c6f672e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d616c697a6861726225324666696c616d656e742d61637469766974792d6c6f67267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d416476616e6365642b61637469766974792b747261636b696e672b666f722b46696c616d656e742b7634266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/4c387141078fc85db5a307f7965cfa6caecc23d7776fa0429f89b2f9e0a9deda/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f46696c616d656e7425323041637469766974792532304c6f672e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d616c697a6861726225324666696c616d656e742d61637469766974792d6c6f67267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d416476616e6365642b61637469766974792b747261636b696e672b666f722b46696c616d656e742b7634266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

[![License](https://camo.githubusercontent.com/31e62e0eff03ce9ddfdf69d8476340d4f541990bfb152cb02a0f342965252997/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](LICENSE)[![Latest Version on Packagist](https://camo.githubusercontent.com/6be3e96bf5cda733a3c370711584c3e388b2c2f5d1656daa0da1900d0b9323e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c697a686172622f66696c616d656e742d61637469766974792d6c6f672e7376673f7374796c653d666f722d7468652d626164676526636f6c6f723d6f72616e6765)](https://packagist.org/packages/alizharb/filament-activity-log)[![Total Downloads](https://camo.githubusercontent.com/6aca1bc255bc0aedd0ce38738f9422f282afa6a352bc156ed53ddb62ec07004e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c697a686172622f66696c616d656e742d61637469766974792d6c6f672e7376673f7374796c653d666f722d7468652d626164676526636f6c6f723d677265656e)](https://packagist.org/packages/alizharb/filament-activity-log)[![PHP Version](https://camo.githubusercontent.com/25db89e64457f22c725874a9ff401325c7996d70cf1ae42e9b593f22b69b7818/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616c697a686172622f66696c616d656e742d61637469766974792d6c6f672e7376673f7374796c653d666f722d7468652d626164676526636f6c6f723d707572706c65)](https://packagist.org/packages/alizharb/filament-activity-log)

 **A powerful, feature-rich activity logging solution for FilamentPHP v4 &amp; v5**
 Seamlessly track, view, and manage user activities with beautiful timelines and insightful dashboards.
 Built on [spatie/laravel-activitylog](https://spatie.be/docs/laravel-activitylog)

---

📖 Table of Contents
-------------------

[](#-table-of-contents)

- [Features](#-features)
- [Requirements](#-requirements)
- [Installation](#-installation)
- [Quick Start](#-quick-start)
- [Core Features](#-core-features)
- [Configuration](#%EF%B8%8F-configuration)
- [Usage Examples](#-usage-examples)
- [Contributing](#-contributing)
- [License](#-license)

---

✨ Features
----------

[](#-features)

### 🎯 Core Functionality

[](#-core-functionality)

- **📦 Full Resource Integration** - Dedicated resource to browse, filter, and search logs
- **⏱️ Timeline View** - Stunning slide-over timeline to visualize record history
- **📊 Insightful Widgets** - Activity charts and latest activity tables
- **🔗 Relation Manager** - Add activity history to any resource
- **🎨 Highly Customizable** - Configure labels, colors, icons, and visibility
- **🔐 Role-Based Access** - Fully compatible with Filament's authorization
- **🌍 Dark Mode Support** - Beautiful in both light and dark modes

---

📋 Requirements
--------------

[](#-requirements)

RequirementVersionStatus[![PHP](https://camo.githubusercontent.com/ac2ada860614f6eeaf52dc1daf22de80255bd66f385140a15bf6dc9d492c1a5a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d3737374242343f7374796c653d666c6174266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/ac2ada860614f6eeaf52dc1daf22de80255bd66f385140a15bf6dc9d492c1a5a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332b2d3737374242343f7374796c653d666c6174266c6f676f3d706870266c6f676f436f6c6f723d7768697465)8.3+✅[![Laravel](https://camo.githubusercontent.com/1d08391696aab4198e3d5ea8859225118d49d461caf96d170c38cea89cdf82ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312b2d4646324432303f7374796c653d666c6174266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/1d08391696aab4198e3d5ea8859225118d49d461caf96d170c38cea89cdf82ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312b2d4646324432303f7374796c653d666c6174266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)11+✅[![Filament](https://camo.githubusercontent.com/856c2128071458f59005b14dd4baafb105a09dc458f899ae4458f32e5adaeb7f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46696c616d656e742d76342b2f76352b2d4635394530423f7374796c653d666c6174266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/856c2128071458f59005b14dd4baafb105a09dc458f899ae4458f32e5adaeb7f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46696c616d656e742d76342b2f76352b2d4635394530423f7374796c653d666c6174266c6f676f3d706870266c6f676f436f6c6f723d7768697465)v4+ / v5+✅**Dependencies:**

- [Spatie Laravel Activitylog](https://spatie.be/docs/laravel-activitylog) - The robust foundation

---

⚡ Installation
--------------

[](#-installation)

### Step 1: Install via Composer

[](#step-1-install-via-composer)

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

### Step 2: Register the Plugin

[](#step-2-register-the-plugin)

Add to your `AdminPanelProvider`:

```
use AlizHarb\ActivityLog\ActivityLogPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            ActivityLogPlugin::make()
                ->label('Log')
                ->pluralLabel('Logs')
                ->navigationGroup('System')
                ->cluster('System'), // Optional: Group inside a cluster
        ]);
}
```

### Step 3: Install Assets &amp; Config

[](#step-3-install-assets--config)

Run the installation command to publish the configuration, assets, and migrations:

```
php artisan filament-activity-log:install
```

---

🎯 Quick Start
-------------

[](#-quick-start)

### 1. Enable Logging on Models

[](#1-enable-logging-on-models)

Ensure your models use the `LogsActivity` trait:

```
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;

class User extends Authenticatable
{
    use LogsActivity;

    public function getActivitylogOptions(): LogOptions
    {
        return LogOptions::defaults()
            ->logAll();
    }
}
```

### 2. Configure Tracking (Optional)

[](#2-configure-tracking-optional)

To automatically capture IP addresses and user agent information, add the generic tap to your `config/activitylog.php`:

```
'activity_logger_taps' => [
    \AlizHarb\ActivityLog\Taps\SetActivityContextTap::class,
],
```

### 3. View Activities

[](#3-view-activities)

Navigate to the **Logs** resource in your admin panel to see all tracked activities.

---

🎯 Core Features
---------------

[](#-core-features)

### 📦 Activity Log Resource

[](#-activity-log-resource)

A dedicated resource allows you to manage all activity logs.

**Features:**

- ✅ **Advanced Filtering** - Filter by causer, subject, event type, and date
- ✅ **Global Search** - Search through log descriptions and properties
- ✅ **Detailed View** - Inspect every detail of an activity log

### ⏱️ Timeline View

[](#️-timeline-view)

Visualize the history of any record with a beautiful timeline.

**Usage:**The timeline is available as a table action in the Relation Manager or can be added to any page.

### 📊 Dashboard Widgets

[](#-dashboard-widgets)

#### Activity Chart Widget

[](#activity-chart-widget)

Displays a line chart showing activity trends over time.

```
use AlizHarb\ActivityLog\Widgets\ActivityChartWidget;

public function getWidgets(): array
{
    return [
        ActivityChartWidget::class,
    ];
}
```

#### Latest Activity Widget

[](#latest-activity-widget)

Shows a list of the most recent activities.

```
use AlizHarb\ActivityLog\Widgets\LatestActivityWidget;

public function getWidgets(): array
{
    return [
        LatestActivityWidget::class,
    ];
}
```

### 🔗 Relation Manager

[](#-relation-manager)

Add an activity log history table to any of your existing resources (e.g., `UserResource`).

```
use AlizHarb\ActivityLog\RelationManagers\ActivitiesRelationManager;

public static function getRelations(): array
{
    return [
        ActivitiesRelationManager::class,
    ];
}
```

### 🏷️ Customizable Subject Titles

[](#️-customizable-subject-titles)

The package automatically checks for `name`, `title`, or `label` attributes on your models. For more control, implement the `HasActivityLogTitle` interface on your model:

```
use AlizHarb\ActivityLog\Contracts\HasActivityLogTitle;

class User extends Model implements HasActivityLogTitle
{
    public function getActivityLogTitle(): string
    {
        return "User: {$this->email}";
    }
}
```

### 📚 Batch Support

[](#-batch-support)

Automatically group activities from a single job or request. Use the **View Batch** action in the Activity Log table to inspect all activities related to a specific batch UUID.

---

⚙️ Configuration
----------------

[](#️-configuration)

You can customize almost every aspect of the package via the `filament-activity-log.php` config file.

📚 **For detailed configuration instructions, including navigation groups and custom authorization, see [CONFIGURATION.md](CONFIGURATION.md)**

### Customizing Table Columns

[](#customizing-table-columns)

```
'table' => [
    'columns' => [
        'log_name' => [
            'visible' => true,
            'searchable' => true,
            'sortable' => true,
        ],
        // ...
    ],
],
```

### Customizing Widgets

[](#customizing-widgets)

```
'widgets' => [
    'activity_chart' => [
        'enabled' => true,
        'days' => 30,
        'fill_color' => 'rgba(16, 185, 129, 0.1)',
        'border_color' => '#10b981',
    ],
    'latest_activity' => [
        'enabled' => true,
        'limit' => 10,
    ],
],
```

### Custom Authorization

[](#custom-authorization)

Restrict access to specific users by implementing a custom authorizer invokable class:

```
// app/Authorizer/ActivityLogAuthorizer.php
namespace App\Authorizors;

class ActivityLogAuthorizer
{
    public function __invoke(User $user): bool
    {
        // Define your custom logic to determine if the user can access the activity log.
         return $user->id === 1;
    }
}
```

Then register it in the config:

```
// config/filament-activity-log.php
'permissions' => [
    'custom_authorization' => \App\Authorizer\ActivityLogAuthorizer::class,
],
```

See [CONFIGURATION.md](CONFIGURATION.md) for more examples.

---

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

### Development Setup

[](#development-setup)

```
# Clone repository
git clone https://github.com/alizharb/filament-activity-log.git

# Install dependencies
composer install

# Run tests
composer test

# Format code
composer format
```

---

💖 Sponsor This Project
----------------------

[](#-sponsor-this-project)

If this package helps you, consider sponsoring its development:

[![Sponsor on GitHub](https://camo.githubusercontent.com/995e464032a20af66fa265a65052d01a2993de729bc3f1e1352e1305a305b71a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d4769744875622d7265643f7374796c653d666f722d7468652d6261646765266c6f676f3d6769746875622d73706f6e736f7273266c6f676f436f6c6f723d7768697465)](https://github.com/sponsors/alizharb)

Your support helps maintain and improve this package! 🙏

---

🐛 Issues &amp; Support
----------------------

[](#-issues--support)

- 🐛 **Bug Reports**: [Create an issue](https://github.com/alizharb/filament-activity-log/issues)
- 💡 **Feature Requests**: [Request a feature](https://github.com/alizharb/filament-activity-log/issues)
- 💬 **Discussions**: [Join the discussion](https://github.com/alizharb/filament-activity-log/discussions)

---

📄 License
---------

[](#-license)

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE.md) file for details.

---

🙏 Acknowledgments
-----------------

[](#-acknowledgments)

- [FilamentPHP](https://filamentphp.com)
- [Spatie Activitylog](https://spatie.be/docs/laravel-activitylog)
- [Ali Harb](https://github.com/alizharb)
- [All Contributors](../../contributors)

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance80

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~13 days

Total

9

Last Release

101d ago

PHP version history (2 changes)v1.0.0PHP ^8.2

v1.2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa785764ac84cfd4a3237f3d4a3471ce97b479ac6fa2171a5ea8bf369c2377e5?d=identicon)[AlizHarb](/maintainers/AlizHarb)

---

Top Contributors

[![AlizHarb](https://avatars.githubusercontent.com/u/34816428?v=4)](https://github.com/AlizHarb "AlizHarb (30 commits)")[![ahmed-fawzy99](https://avatars.githubusercontent.com/u/52136140?v=4)](https://github.com/ahmed-fawzy99 "ahmed-fawzy99 (3 commits)")[![mioduszewski](https://avatars.githubusercontent.com/u/748014?v=4)](https://github.com/mioduszewski "mioduszewski (2 commits)")[![silas229](https://avatars.githubusercontent.com/u/23215125?v=4)](https://github.com/silas229 "silas229 (2 commits)")[![cobisimo](https://avatars.githubusercontent.com/u/2192460?v=4)](https://github.com/cobisimo "cobisimo (1 commits)")[![A909M](https://avatars.githubusercontent.com/u/119125167?v=4)](https://github.com/A909M "A909M (1 commits)")[![mpietrucha](https://avatars.githubusercontent.com/u/25660996?v=4)](https://github.com/mpietrucha "mpietrucha (1 commits)")

---

Tags

phpspatielaravellaravel 12timelinefilamentfilament-pluginaudit-trailactivity-trackingactivity-logfilament-v5audit-logfilament-v4dashboard-widget

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alizharb-filament-activity-log/health.svg)

```
[![Health](https://phpackages.com/badges/alizharb-filament-activity-log/health.svg)](https://phpackages.com/packages/alizharb-filament-activity-log)
```

###  Alternatives

[muhammadsadeeq/laravel-activitylog-ui

A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.

17510.1k](/packages/muhammadsadeeq-laravel-activitylog-ui)[noxoua/filament-activity-log

A Laravel package that simplifies activity logging in the Filament admin panel, with support for logging create, update, delete, and restore actions. It integrates with the 'spatie/laravel-activitylog' package and includes a modernized activity log viewing page.

7151.5k](/packages/noxoua-filament-activity-log)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

141.1k](/packages/mradder-filament-logger)[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14543.9k3](/packages/tomatophp-filament-media-manager)[achyutn/filament-log-viewer

A Filament package to view and manage Laravel logs.

4497.9k30](/packages/achyutn-filament-log-viewer)[tomatophp/filament-pwa

get a PWA feature on your FilamentPHP app with settings from panel

8115.8k](/packages/tomatophp-filament-pwa)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
