PHPackages                             redfieldchristabel/filament-blackbox - 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. [Admin Panels](/categories/admin)
4. /
5. redfieldchristabel/filament-blackbox

ActiveLibrary[Admin Panels](/categories/admin)

redfieldchristabel/filament-blackbox
====================================

A professional-grade auditing UI for Filament PHP. Transform raw laravel-auditing data into a powerful, centralized 'Blackbox' flight recorder with beautiful diffs, relationship-aware timelines, and advanced filtering.

v0.0.10(4mo ago)44941[1 PRs](https://github.com/redfieldchristabel/filament-blackbox/pulls)MITBladePHP ^8.2CI passing

Since Feb 15Pushed 2mo agoCompare

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

READMEChangelog (10)Dependencies (16)Versions (17)Used By (0)

A Military Grade Audit Package for Owen-it/lravel-audit.
========================================================

[](#a-military-grade-audit-package-for-owen-itlravel-audit)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b5b147814a9864c7da9a5ba6af004748df4a62f97d3cf57ab2dc16969aa77f65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265646669656c646368726973746162656c2f66696c616d656e742d626c61636b626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/redfieldchristabel/filament-blackbox)[![GitHub Tests Action Status](https://camo.githubusercontent.com/50cab6811f185c31e1fe0f5b8dce48da64fbae861552cf6e2dcaed2f6894b357/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7265646669656c646368726973746162656c2f66696c616d656e742d626c61636b626f782f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/redfieldchristabel/filament-blackbox/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ef23818b523b475cec76fd11f94e9770dcb53c5f5dbd6415f208023561fa290d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7265646669656c646368726973746162656c2f66696c616d656e742d626c61636b626f782f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/redfieldchristabel/filament-blackbox/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/37b8b033e3da6773aa4660167d2dbeada82e2dbe203c446a0dc5d6b776954574/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7265646669656c646368726973746162656c2f66696c616d656e742d626c61636b626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/redfieldchristabel/filament-blackbox)

A professional-grade auditing UI for Filament PHP. Transform raw laravel-auditing data into a powerful, centralized 'Blackbox' flight recorder with beautiful diffs, relationship-aware timelines, and advanced filtering.

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

[](#installation)

You can install the package via composer:

```
composer require redfieldchristabel/filament-blackbox
```

Important

If you have not set up a custom theme and are using Filament Panels follow the instructions in the [Filament Docs](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme) first.

After setting up a custom theme add the plugin's views to your theme css file or your app's css file if using the standalone packages. This is the recommended way to use the package and the default configuration.

```
@source '../../../../vendor/redfieldchristabel/filament-blackbox/**/*';
```

If you prefer to have the package register the assets for you, you can publish the config file and set `register_assets` to `true`.

### Database Setup

[](#database-setup)

This package relies on [OwenIt/laravel-auditing](https://www.laravel-auditing.com/guide/installation.html). Please follow their official guide to install and configure it first.

If you haven't yet exposed the migrations for the audit package, you can do so with:

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

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-blackbox-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-blackbox-views"
```

This is the contents of the published config file:

```
/**
 * Filament Blackbox Configuration
 */
return [

    /*
    |--------------------------------------------------------------------------
    | Resource Mapping
    |--------------------------------------------------------------------------
    |
    | This maps your Auditable models to their UI badges, routes, and relationships.
    |
    | Model Mapping:
    | The key should be the fully qualified class name of your model.
    |
    | 'badge_class':
    | These classes are APPENDED to the base Filament badge classes:
    | "fi-badge fi-color-custom fi-size-sm fi-badge-color-..."
    | You can use Filament colors (e.g., 'fi-color-primary') or standard Tailwind.
    |
    | IMPORTANT FOR TAILWIND:
    | If you use custom Tailwind classes here, you MUST add the following to
    | your theme's CSS file so Tailwind's JIT compiler scans this config:
    | @source "../../config/blackbox.php";
    |
    | 'resource':
    | The fully qualified name of the Filament Resource class. Used to generate
    | 'edit' or 'view' URLs for the auditable record.
    |
    | 'relations':
    | Defines which related models should have their audits pulled into the
    | main record's timeline (e.g., seeing "Address" edits while viewing a "User").
    |
    | KEY: The relationship name defined on your Model (e.g., 'profile').
    | VALUE: A comma-separated string of nested relationships to eager load
    |        (e.g., 'user,avatar'). If no sub-relations are needed, leave EMPTY ('').
    |
    */
    'resources' => [

        // \App\Models\User::class => [
        //     'label' => 'User',
        //     'badge_class' => 'fi-color-primary', // Appends to base badge classes
        //     'resource' => \App\Filament\Resources\UserResource::class,
        //     'relations' => [
        //         'profile' => '', // Loads profile audits; no sub-relations
        //         'posts'   => 'comments,author', // Loads posts and eager-loads comments/author
        //     ]
        // ],

        /*
        |--------------------------------------------------------------------------
        | Default Fallback Settings
        |--------------------------------------------------------------------------
        */
        'default' => [
            'badge_class' => 'fi-color-gray',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Asset Registration
    |--------------------------------------------------------------------------
    |
    | If true, the package's CSS assets will be automatically registered with Filament.
    |
    | Recommended: Set to false and include the following in your theme's CSS file:
    |
    */
    // @source '../../../../vendor/redfieldchristabel/filament-blackbox/**/*';
    // @source '../../../../config/blackbox.php';

    'register_assets' => false,
];
```

Usage
-----

[](#usage)

```
// In a Filament Panel Provider
$panel
    ->plugin(Blackbox\FilamentBlackbox\FilamentBlackboxPlugin::make())
```

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

[](#screenshots)

[![Black Box Overview](images/Screenshot%202026-03-30%20at%2010-03-28%20Black%20Box%20-%20SISPAA.png)](images/Screenshot%202026-03-30%20at%2010-03-28%20Black%20Box%20-%20SISPAA.png)[![User Audit List](images/Screenshot%202026-03-30%20at%2010-04-27%20Users%20-%20SISPAA.png)](images/Screenshot%202026-03-30%20at%2010-04-27%20Users%20-%20SISPAA.png)[![User Audit Detail](images/Screenshot%202026-03-30%20at%2010-05-00%20Users%20-%20SISPAA.png)](images/Screenshot%202026-03-30%20at%2010-05-00%20Users%20-%20SISPAA.png)[![Black Box Timeline](images/Screenshot%202026-03-30%20at%2010-05-16%20Black%20Box%20-%20SISPAA.png)](images/Screenshot%202026-03-30%20at%2010-05-16%20Black%20Box%20-%20SISPAA.png)

### Soft Deletes &amp; Recovery

[](#soft-deletes--recovery)

Filament Blackbox has built-in, out-of-the-box support for models utilizing Laravel's `SoftDeletes` trait!

When a model is soft-deleted, Blackbox will automatically resolve the trashed record so you can still view its full audit history—no more "Missing Record" errors.

Even better, when viewing the audit log of a `deleted` event for a soft-deleted model, Blackbox provides a native **Restore** action button. This allows administrators with the proper permissions to recover accidentally deleted records with a single click directly from the audit timeline!

### Customizing Audit Rendering

[](#customizing-audit-rendering)

You can customize how specific attributes are rendered in the audit timeline by adding "magic methods" to your Auditable models. This is particularly useful for ID-based fields (like foreign keys) or complex JSON structures.

Define a method following the pattern `{attribute}AuditRenderer` on your model. This method will receive the raw value (from either the `old` or `new` batch) and should return a string representation.

```
namespace App\Models;

use OwenIt\Auditing\Contracts\Auditable;
use Illuminate\Database\Eloquent\Model;

class Order extends Model implements Auditable
{
    use \OwenIt\Auditing\Auditable;

    /**
     * Custom renderer for the 'status_id' attribute.
     * Works for standard events (created, updated) and 'sync' events.
     */
    public function statusIdAuditRenderer($value): string
    {
        return match($value) {
            1 => 'Pending',
            2 => 'Processing',
            3 => 'Completed',
            default => "Unknown ($value)",
        };
    }
}
```

When Blackbox encounters the `status_id` attribute in an audit log, it will automatically use this method to transform the ID into its human-readable label.

#### Relation Morphing (Sync Events)

[](#relation-morphing-sync-events)

This feature is also powerful for `sync` events (commonly used for Many-to-Many relationships like Roles or Tags). When a relation is synced, the audit data often contains full objects. You can "morph" these into simple strings for the UI:

```
class User extends Model implements Auditable
{
    use \OwenIt\Auditing\Auditable;

    /**
     * Morph the 'roles' sync data to show only the role names.
     * The $item parameter will be an array representing the role object.
     */
    public function rolesAuditRenderer(array $item): string
    {
        return $item['name'] ?? 'Unknown Role';
    }
}
```

With this method, the Blackbox UI will show a clean list of role names (e.g., "Admin", "Editor") instead of dumping the raw JSON objects of the roles.

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](.github/SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [redfieldchristabel](https://github.com/redfieldchristabel)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance81

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.8% 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

10

Last Release

134d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44d94d5d7d313575bd46729bc329613059f4b8d7595364d21b286e0e8b1d0641?d=identicon)[redfieldchristabel](/maintainers/redfieldchristabel)

---

Top Contributors

[![redfieldchristabel](https://avatars.githubusercontent.com/u/69151253?v=4)](https://github.com/redfieldchristabel "redfieldchristabel (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelfilamentphpredfieldchristabelfilament-blackbox

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/redfieldchristabel-filament-blackbox/health.svg)

```
[![Health](https://phpackages.com/badges/redfieldchristabel-filament-blackbox/health.svg)](https://phpackages.com/packages/redfieldchristabel-filament-blackbox)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6649.5k1](/packages/marcelweidum-filament-passkeys)[mradder/filament-logger

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

2317.4k](/packages/mradder-filament-logger)[stephenjude/filament-debugger

About

104162.2k2](/packages/stephenjude-filament-debugger)[relaticle/custom-fields

User Defined Custom Fields for Laravel Filament

16354.2k](/packages/relaticle-custom-fields)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16120.1k](/packages/backstage-mails)

PHPackages © 2026

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