phpinnacle / chronica
Auditable Eloquent record histories for Laravel Filament applications.
Requires
- php: ^8.4
- filament/filament: ^4.0|^5.0
- spatie/laravel-activitylog: ^5.0
- spatie/laravel-package-tools: ^1.92
This package is auto-updated.
Last update: 2026-09-01 15:41:22 UTC
README
Chronica adds an auditable history timeline to Eloquent records in Filament. It builds on spatie/laravel-activitylog and provides a packaged activity model, a record concern, timeline descriptors and a Filament action.
Features
- Polymorphic activity history for Eloquent models.
HasHistoryconcern for opt-in models.HistoryActionfor Filament record actions.- Timeline attributes and relations for readable change descriptions.
- Optional custom connection and tenant column.
- Configurable history icon.
Installation
composer require phpinnacle/chronica
php artisan vendor:publish --tag="phpinnacle-chronica-migrations"
php artisan migrate
Optionally publish configuration:
php artisan vendor:publish --tag="phpinnacle-chronica-config"
Registering and using history
Chronica is discovered by Laravel automatically, so panel registration is not required. Existing applications may keep their plugin registration for compatibility:
use PHPinnacle\Chronica\ChronicaPlugin; $panel->plugin(ChronicaPlugin::make());
Add the concern to a model that should expose activity history:
use PHPinnacle\Chronica\Concerns\HasHistory; class Order extends Model { use HasHistory; }
Add the action to a resource page or table using HistoryAction::make(). It opens Chronica's native Filament timeline in a slide-over. Chronica stores events in activity_log; use icon, connection and tenancy in phpinnacle-chronica.php to adapt presentation and persistence.
Testing
composer test
Changelog and license
See CHANGELOG. Released under the MIT License.