{"id":36971982,"url":"https://github.com/crescent-purchasing/filament-auditing","last_synced_at":"2026-01-13T21:55:02.110Z","repository":{"id":296012538,"uuid":"976017249","full_name":"crescent-purchasing/filament-auditing","owner":"crescent-purchasing","description":"Basic Management of O3 IT's Laravel Auditing library","archived":false,"fork":false,"pushed_at":"2025-12-03T08:56:28.000Z","size":1195,"stargazers_count":10,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-05T09:32:17.417Z","etag":null,"topics":["filament","laravel","php"],"latest_commit_sha":null,"homepage":"https://filamentphp.com/plugins/crescent-purchasing-auditing","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crescent-purchasing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"crescent-purchasing"}},"created_at":"2025-05-01T10:28:34.000Z","updated_at":"2025-12-03T08:56:30.000Z","dependencies_parsed_at":"2025-07-17T15:38:44.986Z","dependency_job_id":"185f4fcd-d626-4b7b-95ed-cae47886c41a","html_url":"https://github.com/crescent-purchasing/filament-auditing","commit_stats":null,"previous_names":["crescent-purchasing/filament-auditing"],"tags_count":6,"template":false,"template_full_name":"filamentphp/plugin-skeleton","purl":"pkg:github/crescent-purchasing/filament-auditing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crescent-purchasing%2Ffilament-auditing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crescent-purchasing%2Ffilament-auditing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crescent-purchasing%2Ffilament-auditing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crescent-purchasing%2Ffilament-auditing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crescent-purchasing","download_url":"https://codeload.github.com/crescent-purchasing/filament-auditing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crescent-purchasing%2Ffilament-auditing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28401922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filament","laravel","php"],"created_at":"2026-01-13T21:55:01.961Z","updated_at":"2026-01-13T21:55:02.098Z","avatar_url":"https://github.com/crescent-purchasing.png","language":"PHP","funding_links":["https://github.com/sponsors/crescent-purchasing"],"categories":[],"sub_categories":[],"readme":"# Auditing for Filament\n\n![Filament Auditing Banner](./art/auditing-banner.png)\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/crescent-purchasing/filament-auditing.svg?style=flat-square)](https://packagist.org/packages/crescent-purchasing/filament-auditing)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/crescent-purchasing/filament-auditing/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/crescent-purchasing/filament-auditing/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/crescent-purchasing/filament-auditing/fix-php-code-styling.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/crescent-purchasing/filament-auditing/actions?query=workflow%3A\"Fix+PHP+code+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/crescent-purchasing/filament-auditing.svg?style=flat-square)](https://packagist.org/packages/crescent-purchasing/filament-auditing)\n\nView and manage Audit History for your Laravel Models in Filament.\nBuilt upon the [Laravel Auditing package by OwenIT](https://laravel-auditing.com/).\n\n## Screenshots\n\n### Audit Overview\n![Audits table displaying multiple recorded Audits](./art/auditing-audits.png)\n\n### Viewing Audits\n![Modal view of Audit information after clicking on an Audit](./art/auditing-audit.png)\n\n### Filtering Audits\n![Modal view of form when filtering Audit History](./art/auditing-filters.png)\n\n### Restoring Audits\n![Modal view of form when restoring to a past Audit](./art/auditing-restore.png)\n\n## Features\n\n### Audit Resource\n- View all Audits for all Resources within Filament\n- Filter using a Query Builder\n- View the audited record as well as the user who triggered the audit\n- Uses cursor pagination by default for a performance boost\n\n### Relation Managers\n- View the audits of a specific record to see when it was changed\n- View the audits of a user to see what records they have changed see [Owned Audits](#owned-audits)\n\n### Restoration\n- Restore audits to previous points in their history\n- Simple configuration for managing permission to perform a restoration\n\n## Installation\n\n### Prerequisites\n\nThis package requires the latest major version of Laravel Auditing, v14.\n\nIt'll be installed automatically, but it's recommended to install Laravel Auditing in your own repository.\n\nMake sure to follow the [installation instructions](https://laravel-auditing.com/guide/installation.html).\nIt's recommended to give the [full documentation](https://laravel-auditing.com/guide/introduction.html) a read, too.\n\n```bash\ncomposer require owen-it/laravel-auditing\n```\n\nNamely, make sure you publish the migration and configuration:\n\n```bash\nphp artisan vendor:publish --provider \"OwenIt\\Auditing\\AuditingServiceProvider\" --tag=\"config\"\n```\n\n```bash\nphp artisan vendor:publish --provider \"OwenIt\\Auditing\\AuditingServiceProvider\" --tag=\"migrations\"\nphp artisan migrate\n```\n\n### Install\n\nYou can then install this package via composer:\n\n```bash\ncomposer require crescent-purchasing/filament-auditing\n```\n\n## Usage\n\nTo use this plugin within your panel, add it to your `plugins()` section in your `PanelProvider`:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\nuse Filament\\Panel;\nuse Filament\\PanelProvider;\n\nclass AuditPanelProvider extends PanelProvider\n{\n    public function panel(Panel $panel): Panel\n    {\n        return $panel\n            -\u003edefault()\n            -\u003eid('admin')\n            // ...\n            -\u003eplugins([\n                FilamentAuditingPlugin::make(),\n            ]);\n    }\n}\n```\n\nThis will automatically add the Resource Page to your Filament Panel.\nIt should also provide some basic configuration that will work for most use-cases.\n\n### Relation Manager\n\nThe plugin allows you to view the audit history of a specific record.\nTo do so, simply add the Relation Manager to the resource:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\Filament\\RelationManagers\\AuditsRelationManager;\n\npublic static function getRelations(): array\n{\n    return [\n        AuditsRelationManager::class,\n    ];\n}\n```\n\n### Owned Audits\n\nThe plugin comes with the `OwnedAuditsRelationManager`. This by default doesn't have support with Laravel Auditing.\nHowever, it's easy to add the support. Simply add a relation function like the following to each of your User Models:\n\n```php\nuse Illuminate\\Database\\Eloquent\\Relations\\MorphMany;\nuse OwenIt\\Auditing\\Models\\Audit;\n\n/**\n * @return MorphMany\u003cAudit, $this\u003e\n */\npublic function ownedAudits(): MorphMany\n{\n    return $this-\u003emorphMany(Audit::class, 'user');\n}\n```\n\nThen, add the relation manager to your Resources as normal:\n\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\Filament\\RelationManagers\\OwnedAuditsRelationManager;\n\npublic static function getRelations(): array\n{\n    return [\n        OwnedAuditsRelationManager::class,\n    ];\n}\n```\n\n## Configuration\n\nYou can configure a few parts of the application.\n\n### Cursor Pagination\n\nCursor Pagination for Audits is enabled by default. You can disable this using `cursorPagination()`:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\n\nFilamentAuditingPlugin::make()\n    -\u003ecursorPagination(false)\n```\n\n### Audit Model\n\nBy default, the configured `audit.implementation` config value is used for the Audit Model.\nThis can be modified using `model()`\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\n\nFilamentAuditingPlugin::make()\n    -\u003emodel(\\OwenIt\\Auditing\\Models\\Audit::class)\n```\n\n### Formatting Auditable Type\n\nThe Auditable Type in tables is formatted as a Headline of the Class Basename.\nYou can customise this using a closure within `formatAuditableTypeUsing()`:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\n\nFilamentAuditingPlugin::make()\n    -\u003eformatAuditableTypeUsing(fn(string $value): string =\u003e strtoupper($value))\n```\n\n### Formatting Event Name\n\nThe event names are turned into a Headline. You can customise this using `formatEventUsing()`:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\n\nFilamentAuditingPlugin::make()\n    -\u003eformatEventUsing(fn(string $value): string =\u003e strtoupper($value))\n```\n\n### Navigation Group\n\nNo Navigation Group for the Resource is set by default. You can set this using `navigationGroup()`:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\n\nFilamentAuditingPlugin::make()\n    -\u003enavigationGroup('Administration')\n```\n\n### Navigation Icon\n\nThe Resource icon by default is `heroicon-o-clock`. You can set this using `navigationIcon()`:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\n\nFilamentAuditingPlugin::make()\n    -\u003enavigationIcon('heroicon-o-check')\n```\n\n### Restore Permission\n\nThe permission used for Audit restoration is `restoreAudit` by default. You can set this using `restorePermission()`\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\n\nFilamentAuditingPlugin::make()\n    -\u003erestorePermission('goToOldAudit')\n```\n\n### Users\n\nThe default list of User classes is determined using the `audit.user.guards` config value.\nThis then checks the list of auth providers in `auth.providers`.\nYou can change this behaviour with `users()`:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\n\nFilamentAuditingPlugin::make()\n    -\u003eusers([\\CrescentPurchasing\\FilamentAuditing\\Tests\\Models\\User::class])\n```\n\n### User Table Schema\n\nBy default, viewing user information of an Audit only displays 2 columns: `email` and `id`.\nYou can specify additional columns with `userSchema`:\n\n```php\nuse CrescentPurchasing\\FilamentAuditing\\FilamentAuditingPlugin;\nuse Filament\\Forms\\Components\\TextInput;\n\nFilamentAuditingPlugin::make()\n    -\u003euserSchema([\n        TextInput::make('first_name'),\n        TextInput::make('last_name'),\n    ])\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](https://github.com/crescent-purchasing/filament-auditing/security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Crescent Purchasing .Ltd](https://github.com/crescent-purchasing)\n- [Robert Lyons](https://github.com/aSeriousDeveloper)\n- [All Contributors](https://github.com/crescent-purchasing/filament-auditing/contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrescent-purchasing%2Ffilament-auditing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrescent-purchasing%2Ffilament-auditing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrescent-purchasing%2Ffilament-auditing/lists"}