A Laravel package that automatically creates a revision history for any Eloquent model with minimal setup.
Revisionable is a Laravel package that automatically maintains a revision history for Eloquent models. It solves the problem of tracking data changes over time by recording every modification, including what changed, the old and new values, and which user made the change, all with minimal configuration.
Laravel developers building applications that require audit trails, version history for content, or accountability for data changes, such as CMS platforms, admin panels, or enterprise systems.
Developers choose Revisionable because it integrates seamlessly into Laravel projects via a simple trait, requires almost no setup, and provides detailed, customizable revision tracking without writing boilerplate code for each model.
Easily create a revision history for any laravel model
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Adding the RevisionableTrait to any Eloquent model instantly enables revision tracking without altering business logic, as demonstrated in the implementation examples.
Automatically associates revisions with authenticated users via Laravel's Auth, Sentry, or Sentinel, ensuring accountability out-of-the-box.
Allows precise tracking with arrays like $keepRevisionOf and $dontKeepRevisionOf, letting developers exclude sensitive or irrelevant fields easily.
Supports formatted output for dates, booleans, and empty states via $revisionFormattedFields, making audit logs human-readable without extra code.
Includes $historyLimit and $revisionCleanup to cap and prune old revisions, helping manage database growth in long-running applications.
Every model change inserts a revision record, which can exponentially increase database size and write latency without careful limits, as admitted in the history management section.
While it logs changes, Revisionable lacks methods to revert to previous states, forcing developers to implement undo functionality manually.
Heavily dependent on Eloquent and Laravel's ecosystem, making migration to other frameworks or ORMs difficult without rewriting revision logic.
Primarily tracks scalar field changes; complex updates like polymorphic relationships or computed attributes require custom event handling, as noted in the events section.