nebo15/eloquent.changelog
Laravel package that adds changelog/history tracking to Eloquent models. Record changes to attributes and keep an audit trail you can query later, useful for debugging, compliance, and reviewing edits over time.
where clauses for date ranges).creating, updating, deleting) to log changes. Minimal code changes required if events are already in use.changelogs table (schema provided in migrations).timestamps/softDeletes columns.replicating, restored).new EloquentModel() syntax).changelogs table) after existing model migrations.model_type, model_id, and created_at for query performance.Model::observe(\Nebo15\EloquentChangelog\ChangelogObserver::class);
Model::dispatch()).User, Order).updated_at for updates).timestamps columns).changelogs table by created_at (PostgreSQL) or use a time-series DB.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Event observer fails | Missing changelog entries | Retry mechanism or dead-letter queue |
| Database connection drops | Incomplete changelog records | Transaction retries or async logging |
| Schema drift | Broken queries | Schema migrations + CI validation |
| No retention policy | Unmanageable table bloat | Automated purging (e.g., Laravel Scheduler) |
Changelog::forModel($model)).SELECT * FROM changelogs time).How can I help you explore Laravel packages today?