Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rewind Laravel Package

laragear/rewind

Rewind adds undo history to Laravel Eloquent models. It records model changes and lets you restore previous states, so you can safely revert updates, deletes, and other modifications through a simple API—ideal for audit trails, recovery, and user-facing undo features.

View on GitHub
Deep Wiki
Context7

Travel back in time to see past model states, and restore them in one line.

Frequently asked questions about Rewind
How do I install Laragear Rewind in a Laravel application?
Install it with Composer via composer require laragear/rewind, then publish the package assets and run your migrations so the history records have somewhere to live. Because Rewind persists model states, the migration step is not optional. Check the package README and composer.json for the exact publish tags and the minimum PHP and Laravel versions before you start.
Which Laravel and PHP versions does Laragear Rewind support?
Confirm this against the package's composer.json rather than assuming, since a major release can raise the floor. A modern Laravel 10, 11 or 12 application on PHP 8.2+ is the baseline most Laragear packages target, but v3 may have moved it. If you are on an older LTS, verify before planning an upgrade.
What are the breaking changes in Rewind v3.0.0 and how do I upgrade from v2?
The published v3.0.0 release body only links to a changelog, so there is no official migration guide or deprecation list to work from. Read the changelog diff and skim the commit log for breaking markers, then bump the constraint on a spike branch, republish the config and run your test suite. Only approve a production upgrade after that verification pass, not on the release note alone.
Is Laragear Rewind v2 still maintained, and can I stay on it?
That is a question for the maintainer, and it matters: staying on v2 is only a viable option if it still receives security fixes. Rewind is a small, conventionally single-maintainer Laragear package, so confirm the support window and ask whether there is a security-reporting channel. If v2 support is unclear, adopting v3 in new services only is the lowest-risk path.
Where does Rewind store the model history, and does it need a new database table?
Rewind records model changes, which means persisted history rather than an in-memory log, so expect migrations that create or alter storage. The key upgrade question for v3 is whether the schema or the serialized record format changed, because that turns a composer update into a data-migration project. Verify whether history written by v2 is readable by v3 before you upgrade an existing install.
How do I restore a model to a previous state with Rewind?
Rewind is designed around a simple API that lets you travel back to a past model state and restore it in one line, covering updates, deletes and other modifications. In practice you exercise the create, rewind and restore path against real seeded data rather than relying on unit tests alone. Check the README for the exact method names on the model trait or facade in your installed version.
Does Rewind handle deletes as well as updates?
Yes. The package records model changes and lets you revert deletes along with updates and other modifications, which is what makes it useful for recovery and user-facing undo features. If you rely on soft deletes, read the docs for how those interact with the recorded history. Test the delete and restore path explicitly in your spike, since it is the highest-consequence behaviour.
What is the performance overhead of recording history on every model save?
Rewind writes a history record whenever a tracked model changes, so expect extra writes and storage growth proportional to how much those models are updated. Apply it to the models that actually need audit trails or undo, not to every model in the application. Benchmark on a realistic dataset and plan a retention or pruning strategy for old history rows.
How do I test Laragear Rewind in my Laravel test suite?
Use RefreshDatabase so the history tables exist in your test database, then assert on model state after a rewind or restore call. Run any tests the package ships with, and add integration tests that cover create, rewind and restore against seeded data. If you are upgrading, run that same suite against v3 on a branch before touching production.
What are the alternatives to Rewind for Laravel model auditing and versioning?
Activity-log and audit packages such as spatie/laravel-activitylog and owen-it/laravel-auditing focus on recording who changed what, while Rewind's differentiator is restoring a previous model state in one line. If you mainly need an audit trail, a logging package may be enough; if you need undo and recovery, Rewind targets that directly. Check how each option handles deletes, storage growth and Laravel version support before choosing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource