PHPackages                             ghonaim/filament-audit-logger - 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. ghonaim/filament-audit-logger

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

ghonaim/filament-audit-logger
=============================

Production-ready audit &amp; activity logger plugin for FilamentPHP v3 — tracks Eloquent model changes and admin panel user activity.

v1.0.1(yesterday)01↑2900%MITPHPPHP ^8.2

Since Aug 24Pushed yesterdayCompare

[ Source](https://github.com/omarghonaim/FilamentPHP-Plugin)[ Packagist](https://packagist.org/packages/ghonaim/filament-audit-logger)[ RSS](/packages/ghonaim-filament-audit-logger/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (9)Versions (3)Used By (0)

Filament Audit &amp; Activity Logger
====================================

[](#filament-audit--activity-logger)

Production-ready audit logging for FilamentPHP v3. Tracks Eloquent model create/update/delete/restore events and admin panel activity, zero external logging dependency.

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

[](#installation)

```
composer require ghonaim/filament-audit-logger
php artisan vendor:publish --tag="filament-audit-migrations"
php artisan migrate
php artisan vendor:publish --tag="filament-audit-config"
```

Register the plugin in your panel provider:

```
use Ghonaim\FilamentAuditLogger\FilamentAuditLoggerPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentAuditLoggerPlugin::make(),
        ]);
}
```

Usage
-----

[](#usage)

Attach the trait to any model you want tracked:

```
use Ghonaim\FilamentAuditLogger\Traits\HasFilamentAudit;

class Invoice extends Model
{
    use HasFilamentAudit;

    // Optional per-model overrides:
    protected array $auditEvents = ['created', 'updated', 'deleted', 'restored'];
    protected array $auditExclude = ['internal_notes'];
    protected array $auditInclude = []; // whitelist; empty = all attributes
}
```

Browse `Audit Logs` in the admin nav. Filter by user, action, model type, date range, IP. Click a row to open the diff view (old vs new values, side by side, changed fields highlighted).

Configuration
-------------

[](#configuration)

See `config/filament-audit.php` — retention window, critical actions, navigation placement, export disk, globally excluded attributes (password, tokens, etc. are stripped by default), and the authorization gate name (`view-audit-logs`).

Bind the gate in an `AuthServiceProvider`:

```
Gate::define('view-audit-logs', fn ($user) => $user->isAdmin());
```

Pruning
-------

[](#pruning)

```
php artisan audit:prune                # uses config retention_days
php artisan audit:prune --days=30
php artisan audit:prune --dry-run
```

Auto-scheduled daily at 02:00 when `prune.auto_schedule` is true.

Export
------

[](#export)

Use the "Export" header action on the Audit Logs table (CSV/Excel). The export dispatches `ExportAuditLogsJob` onto the queue — configure `QUEUE_CONNECTION` for real async behavior; the file lands on the disk set in `filament-audit.export.disk`.

Customization
-------------

[](#customization)

- Swap the diff view: publish `resources/views/vendor/filament-audit` and edit `components/diff-viewer.blade.php`.
- Add custom metadata per model by overriding `auditMetadata()`.
- Change the acting-user guard via `filament-audit.user_guard`.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21233773?v=4)[ghonaim](/maintainers/ghonaim)[@Ghonaim](https://github.com/Ghonaim)

---

Top Contributors

[![omarghonaim](https://avatars.githubusercontent.com/u/27961793?v=4)](https://github.com/omarghonaim "omarghonaim (3 commits)")

---

Tags

loggingAuditfilamentactivity-log

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ghonaim-filament-audit-logger/health.svg)

```
[![Health](https://phpackages.com/badges/ghonaim-filament-audit-logger/health.svg)](https://phpackages.com/packages/ghonaim-filament-audit-logger)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[tapp/filament-form-builder

User facing form builder using Filament components

133.5k6](/packages/tapp-filament-form-builder)[tapp/filament-lms

204.4k](/packages/tapp-filament-lms)[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

316.8k2](/packages/finity-labs-fin-mail)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17861.9k3](/packages/stephenjude-filament-jetstream)[mradder/filament-logger

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

2324.4k1](/packages/mradder-filament-logger)

PHPackages © 2026

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