finds.dev← search

// the find

overtrue/laravel-versionable

★ 587 · PHP · MIT · updated Oct 2026

⏱️Make Laravel model versionable

A trait-based package that adds version history to Eloquent models, storing either full snapshots or diffs of changed attributes on save, with revert and diff helpers. Fits Laravel apps that need audit trails or undo on a handful of models (CMS content, settings, anything editors touch) rather than a full event-sourcing setup.

The DIFF vs SNAPSHOT storage strategy is exposed as a config choice instead of hardcoded, so you can trade storage size for full-snapshot convenience per model. Diff rendering is delegated to jfcherng/php-diff, giving array/text/HTML/side-by-side output for free instead of a half-baked custom differ. Soft-delete and force-delete on versions mirror Eloquent's own SoftDeletes semantics, so it composes naturally with models that already soft-delete. withoutVersion() as a closure is a clean way to suppress versioning during bulk imports or seeders without touching model state.

The README advertises 'keep the specified number of versions' as a feature but never shows how to configure that limit in Usage — you have to go read the config file to find it. No guidance on what happens to relationships or JSON/array-cast attributes when diffing; the examples are all flat scalar fields. No discussion of write volume: a frequently-saved model (e.g. a counter or status field) will accumulate a version row per save with no mention of archiving or batching old versions. Custom version models are covered in two lines with no note on backfilling existing version rows if you add a new versionable attribute later.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →