PHPackages                             crescent-purchasing/filament-auditing - 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. crescent-purchasing/filament-auditing

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

crescent-purchasing/filament-auditing
=====================================

Basic Management of O3 IT's Laravel Auditing library

v2.0.0(2mo ago)104.6k↓39%2[2 issues](https://github.com/crescent-purchasing/filament-auditing/issues)[2 PRs](https://github.com/crescent-purchasing/filament-auditing/pulls)MITPHPPHP ^8.4CI passing

Since May 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/crescent-purchasing/filament-auditing)[ Packagist](https://packagist.org/packages/crescent-purchasing/filament-auditing)[ Docs](https://github.com/crescent-purchasing/filament-auditing)[ GitHub Sponsors](https://github.com/crescent-purchasing)[ RSS](/packages/crescent-purchasing-filament-auditing/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (29)Versions (11)Used By (0)

Auditing for Filament
=====================

[](#auditing-for-filament)

[![Filament Auditing Banner](./art/auditing-banner.png)](./art/auditing-banner.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a3cf601ba931fd89bd1b9b6945975ac121dc7a427435a165f22f452398cf73c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6372657363656e742d70757263686173696e672f66696c616d656e742d6175646974696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/crescent-purchasing/filament-auditing)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9b976ddaf5967971a72a80856c595a677d2bdde8a5f2cc4ec38e8684fd0ea752/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6372657363656e742d70757263686173696e672f66696c616d656e742d6175646974696e672f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/crescent-purchasing/filament-auditing/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ee35e7e675aa40e96522f2b969ccbcfb82f4952a572b8eaed4572637a7c9637d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6372657363656e742d70757263686173696e672f66696c616d656e742d6175646974696e672f6669782d7068702d636f64652d7374796c696e672e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/crescent-purchasing/filament-auditing/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/408ea5541f922360f70306042b63da32e29d8f86d212fbb42d03fc7555c1fda9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6372657363656e742d70757263686173696e672f66696c616d656e742d6175646974696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/crescent-purchasing/filament-auditing)

View and manage Audit History for your Laravel Models in Filament. Built upon the [Laravel Auditing package by OwenIT](https://laravel-auditing.com/).

Screenshots
-----------

[](#screenshots)

### Audit Overview

[](#audit-overview)

[![Audits table displaying multiple recorded Audits](./art/auditing-audits.png)](./art/auditing-audits.png)

### Viewing Audits

[](#viewing-audits)

[![Modal view of Audit information after clicking on an Audit](./art/auditing-audit.png)](./art/auditing-audit.png)

### Filtering Audits

[](#filtering-audits)

[![Modal view of form when filtering Audit History](./art/auditing-filters.png)](./art/auditing-filters.png)

### Restoring Audits

[](#restoring-audits)

[![Modal view of form when restoring to a past Audit](./art/auditing-restore.png)](./art/auditing-restore.png)

Features
--------

[](#features)

### Audit Resource

[](#audit-resource)

- View all Audits for all Resources within Filament
- Filter using a Query Builder
- View the audited record as well as the user who triggered the audit
- Uses cursor pagination by default for a performance boost

### Relation Managers

[](#relation-managers)

- View the audits of a specific record to see when it was changed
- View the audits of a user to see what records they have changed see [Owned Audits](#owned-audits)

### Restoration

[](#restoration)

- Restore audits to previous points in their history
- Simple configuration for managing permission to perform a restoration

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

[](#installation)

### Prerequisites

[](#prerequisites)

This package requires the latest major version of Laravel Auditing, v14.

It'll be installed automatically, but it's recommended to install Laravel Auditing in your own repository.

Make sure to follow the [installation instructions](https://laravel-auditing.com/guide/installation.html). It's recommended to give the [full documentation](https://laravel-auditing.com/guide/introduction.html) a read, too.

```
composer require owen-it/laravel-auditing
```

Namely, make sure you publish the migration and configuration:

```
php artisan vendor:publish --provider "OwenIt\Auditing\AuditingServiceProvider" --tag="config"
```

```
php artisan vendor:publish --provider "OwenIt\Auditing\AuditingServiceProvider" --tag="migrations"
php artisan migrate
```

### Install

[](#install)

You can then install this package via composer:

```
composer require crescent-purchasing/filament-auditing
```

Usage
-----

[](#usage)

To use this plugin within your panel, add it to your `plugins()` section in your `PanelProvider`:

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;
use Filament\Panel;
use Filament\PanelProvider;

class AuditPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->default()
            ->id('admin')
            // ...
            ->plugins([
                FilamentAuditingPlugin::make(),
            ]);
    }
}
```

This will automatically add the Resource Page to your Filament Panel. It should also provide some basic configuration that will work for most use-cases.

### Relation Manager

[](#relation-manager)

The plugin allows you to view the audit history of a specific record. To do so, simply add the Relation Manager to the resource:

```
use CrescentPurchasing\FilamentAuditing\Filament\RelationManagers\AuditsRelationManager;

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

### Owned Audits

[](#owned-audits)

The plugin comes with the `OwnedAuditsRelationManager`. This by default doesn't have support with Laravel Auditing. However, it's easy to add the support. Simply add a relation function like the following to each of your User Models:

```
use Illuminate\Database\Eloquent\Relations\MorphMany;
use OwenIt\Auditing\Models\Audit;

/**
 * @return MorphMany
 */
public function ownedAudits(): MorphMany
{
    return $this->morphMany(Audit::class, 'user');
}
```

Then, add the relation manager to your Resources as normal:

```
use CrescentPurchasing\FilamentAuditing\Filament\RelationManagers\OwnedAuditsRelationManager;

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

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

[](#configuration)

You can configure a few parts of the application.

### Cursor Pagination

[](#cursor-pagination)

Cursor Pagination for Audits is enabled by default. You can disable this using `cursorPagination()`:

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;

FilamentAuditingPlugin::make()
    ->cursorPagination(false)
```

### Audit Model

[](#audit-model)

By default, the configured `audit.implementation` config value is used for the Audit Model. This can be modified using `model()`

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;

FilamentAuditingPlugin::make()
    ->model(\OwenIt\Auditing\Models\Audit::class)
```

### Formatting Auditable Type

[](#formatting-auditable-type)

The Auditable Type in tables is formatted as a Headline of the Class Basename. You can customise this using a closure within `formatAuditableTypeUsing()`:

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;

FilamentAuditingPlugin::make()
    ->formatAuditableTypeUsing(fn(string $value): string => strtoupper($value))
```

### Formatting Event Name

[](#formatting-event-name)

The event names are turned into a Headline. You can customise this using `formatEventUsing()`:

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;

FilamentAuditingPlugin::make()
    ->formatEventUsing(fn(string $value): string => strtoupper($value))
```

### Navigation Group

[](#navigation-group)

No Navigation Group for the Resource is set by default. You can set this using `navigationGroup()`:

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;

FilamentAuditingPlugin::make()
    ->navigationGroup('Administration')
```

### Navigation Icon

[](#navigation-icon)

The Resource icon by default is `heroicon-o-clock`. You can set this using `navigationIcon()`:

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;

FilamentAuditingPlugin::make()
    ->navigationIcon('heroicon-o-check')
```

### Restore Permission

[](#restore-permission)

The permission used for Audit restoration is `restoreAudit` by default. You can set this using `restorePermission()`

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;

FilamentAuditingPlugin::make()
    ->restorePermission('goToOldAudit')
```

### Users

[](#users)

The default list of User classes is determined using the `audit.user.guards` config value. This then checks the list of auth providers in `auth.providers`. You can change this behaviour with `users()`:

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;

FilamentAuditingPlugin::make()
    ->users([\CrescentPurchasing\FilamentAuditing\Tests\Models\User::class])
```

### User Table Schema

[](#user-table-schema)

By default, viewing user information of an Audit only displays 2 columns: `email` and `id`. You can specify additional columns with `userSchema`:

```
use CrescentPurchasing\FilamentAuditing\FilamentAuditingPlugin;
use Filament\Forms\Components\TextInput;

FilamentAuditingPlugin::make()
    ->userSchema([
        TextInput::make('first_name'),
        TextInput::make('last_name'),
    ])
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](https://github.com/crescent-purchasing/filament-auditing/security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Crescent Purchasing .Ltd](https://github.com/crescent-purchasing)
- [Robert Lyons](https://github.com/aSeriousDeveloper)
- [All Contributors](https://github.com/crescent-purchasing/filament-auditing/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance84

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 95.1% 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 ~51 days

Recently: every ~77 days

Total

7

Last Release

69d ago

Major Versions

v0.1.0 → v1.0.02025-05-28

v1.1.0 → v2.0.02026-03-10

PHP version history (4 changes)v0.0.0PHP ^8.1

v0.0.1PHP ^8.2

v1.0.0PHP ^8.3

v2.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/66e95f075caa4c9afc9b931cbb84af9e6803b3ee2353d9de46329a236c635b71?d=identicon)[r.lyons](/maintainers/r.lyons)

---

Top Contributors

[![aSeriousDeveloper](https://avatars.githubusercontent.com/u/39706150?v=4)](https://github.com/aSeriousDeveloper "aSeriousDeveloper (274 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![fpatelm](https://avatars.githubusercontent.com/u/6500152?v=4)](https://github.com/fpatelm "fpatelm (3 commits)")[![zafermesut](https://avatars.githubusercontent.com/u/86682206?v=4)](https://github.com/zafermesut "zafermesut (3 commits)")[![roblyonscpc](https://avatars.githubusercontent.com/u/93336802?v=4)](https://github.com/roblyonscpc "roblyonscpc (1 commits)")

---

Tags

filamentlaravelphplaravelcrescent-purchasingfilament-auditing

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/crescent-purchasing-filament-auditing/health.svg)

```
[![Health](https://phpackages.com/badges/crescent-purchasing-filament-auditing/health.svg)](https://phpackages.com/packages/crescent-purchasing-filament-auditing)
```

###  Alternatives

[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[spatie/laravel-slack-alerts

Send a message to Slack

3212.6M4](/packages/spatie-laravel-slack-alerts)[dotswan/filament-laravel-pulse

82137.2k1](/packages/dotswan-filament-laravel-pulse)[tapp/filament-maillog

Filament plugin to view outgoing mail

2952.6k1](/packages/tapp-filament-maillog)[spatie/laravel-error-share

Share your Laravel errors to Flare

43965.6k3](/packages/spatie-laravel-error-share)

PHPackages © 2026

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