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

Reanimate Laravel Package

mpociot/reanimate

Reanimate adds a recycle bin to Laravel Eloquent models. Use the Reanimate trait to delete records and restore them later without adding soft-delete columns to your tables—deleted models are stored separately, keeping your schema clean while deletions stay undoable.

View on GitHub
Deep Wiki
Context7

Reanimate is a Laravel package that records changes to your Eloquent models and lets you replay them as an animation. Add the Reanimate trait to a model and each save stores a revision of its attributes; you can then walk through that history and animate the transitions between states—ideal for dashboards, timelines, or "how did this record evolve" views.

  • Trait-based revision tracking for any Eloquent model
  • Automatic capture of attribute changes on save
  • Replay stored history step by step via a simple callback
  • Configurable storage for revisions
  • Drop-in Laravel service provider, no setup required
Frequently asked questions about Reanimate
What does mpociot/reanimate do in Laravel?
Reanimate adds a trait to Eloquent models so each save stores a revision of the model's attributes. You can then replay that stored history step by step through a simple callback to animate transitions between states. It is intended for dashboards, timelines, and views that show how a record evolved.
How do I install mpociot/reanimate?
Install it with composer require mpociot/reanimate in your Laravel application. The package ships with a drop-in service provider, and you add the Reanimate trait to the Eloquent models you want to track. Review or publish any configuration for revision storage before using it in production.
Does Reanimate require database migrations or soft-delete columns?
The provided context says the soft-delete/recycle-bin use case requires no schema change or data migration and does not add soft-delete columns. Revisions are described as using configurable storage, so confirm whether that means a separate table, driver, or snapshot store. Always verify the installed version against your own schema and retention requirements.
Which Laravel and PHP versions does mpociot/reanimate support?
The supplied context does not list exact illuminate/* or PHP version constraints. Check the repository's composer.json and latest release before adopting it. Because the package is small, a short install spike is the fastest way to confirm compatibility with your Laravel version.
How does replaying model history work with Reanimate?
After changes are captured, Reanimate lets you walk through the stored history step by step using a simple callback. That makes it possible to animate transitions between attribute states for timelines or record-evolution views. Test the ordering and payload shape with representative data before building UI around it.
Is Reanimate a soft-delete recycle bin or a revision tracking package?
The overview describes revision tracking and replay of Eloquent attribute changes, while another description calls it a recycle bin for deleted models without soft-delete columns. Those are materially different mechanisms with different security and compliance implications. Read the package source and composer metadata before assuming restore or snapshot behavior.
How should I secure restore or replay endpoints in production?
Treat Reanimate as a data-access mechanism, not an authorization layer. Put any restore or replay route behind your Laravel policies, tenant scoping, middleware, and an explicit trashed check where relevant. Add audit logging and retention rules around any sensitive snapshot data the package stores.
Does Reanimate cascade restores across Eloquent relationships?
The context identifies cascading restore of a parent plus soft-deleted children as the genuinely non-trivial capability, but cascade semantics should not be assumed as a default. Verify restore order, foreign-key constraints, polymorphic relations, deep cascades, UUID/ULID keys, and multi-tenancy against your real schema. Wrap multi-record restores in a transaction so a partial cascade cannot leave unintended state.
Can I use Reanimate if my application uses hard deletes?
Reanimate cannot recover records that have been hard-deleted because the data no longer exists. Its recovery use case assumes Laravel SoftDeletes are used consistently across the relevant models. If soft deletes are sporadic, fix the data model first or limit adoption to models where reversible deletion is an explicit product decision.
Is mpociot/reanimate actively maintained and safe to depend on?
The context cites roughly 122 stars, zero dependents, a single maintainer, and best-effort upstream maintenance. Pin the version, vendor or fork it, and treat an in-house reimplementation as a scoped afternoon rather than a rewrite. For a data-recovery path, do a source review and integration spike before production adoption.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core