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

Product Decisions This Supports

  • Whether "undo delete" is a real user need or a nice-sounding feature. Reanimate makes that question cheap to answer: a trait on a handful of models and one guarded admin endpoint, roughly a day of work. Fund it as a time-boxed spike with a success metric attached (deletion-related tickets per week before and after) rather than as a roadmap line item. Cheap to try, cheap to abandon is the whole argument.
  • Scoping the recycle bin honestly. The package restores data. It does not deliver the product: restore UI, per-role permissions, retention windows, bulk operations with sane partial-failure behavior, audit trail. That gap is the useful input — it tells you the expensive part of the roadmap item is governance and interface, not the database mechanics, which is what you need to size it.
  • Forcing an answer to "what does delete mean here?" Cascade restoration of a parent plus its soft-deleted children only works if soft deletes are used consistently across the schema. Adopting this surfaces that answer early. The result determines whether recovery is a coherent platform capability or a per-entity special case, and it carries into every future retention and compliance decision.
  • A measurable support-deflection case rather than a vague UX win. Accidental deletion is a recurring, low-drama ticket with a real resolution cost. An admin restore action is a countable deflection play, and the delta is the justification for keeping or retiring it.
  • Ranking use cases that are now cheap. Support-driven account recovery, CRM contact reinstatement, order re-creation, CMS content restore, admin-only data fixes — all become small once the cascade works. Compliance-driven recovery (GDPR erasure reversal, legal hold) does not; authorization, audit, and policy work there dwarfs the restore call.
  • An honest build-vs-adopt framing. The alternative is a few dozen lines of owned code, not a vendor contract. The decision is "a day validating with someone else's code" versus "two days writing ours." Both are defensible; the package wins when speed beats ownership and loses when the restore path touches sensitive data.

When to Consider This Package

Consider it when:

  • The product is a Laravel app that already uses SoftDeletes consistently. On top of hard deletes it adds nothing and cannot recover what no longer exists.
  • The concrete need is restoring a record together with its soft-deleted children in one action. That cascade is the genuinely fiddly part and the clearest reason to take a dependency.
  • You're running a spike, an internal tool, or an admin-only surface where a small single-maintainer package is an acceptable trade for a day of saved effort.
  • You want to test demand for undo-delete before committing to a real recycle bin with UI, permissions, and retention policy.
  • You can wrap it behind your own authorization and audit layer, and forking a small codebase if it goes dormant is acceptable.

Look elsewhere when:

  • You need the recycle-bin product itself — restore UI, role-based permissions, TTL/retention, audit logging, bulk operations with clear partial-failure semantics. The package is deliberately minimal; it is not an 80% version of that feature.
  • Restoring is a policy decision, not a UX convenience. If trashed rows hold PII, financial records, or erasure requests, "restore" being one HTTP call away is a governance problem, and that path must ship with authorization and audit or be built in-house.
  • The relational graph is complex — polymorphic relations, deep cascades, UUID/ULID keys, multi-tenancy. Test against the real schema in the spike; do not assume coverage.
  • Soft deletes aren't your recovery mechanism, or you're standardizing on an event-sourced audit trail instead.
  • Laravel/PHP version support is unconfirmed. Check illuminate/* constraints and commit recency; this was authored against an earlier Laravel era. An unmaintained dependency on the data-recovery path is a bad trade for code you could write in an afternoon.
  • You need maintenance guarantees or community validation. ~122 stars, zero dependents, a single maintainer — adopting means owning.
  • Reconcile one ambiguity first: sources describe it both as a thin soft-delete wrapper and as snapshot-based ("keeps data available without relying on soft deletes"). If it truly persists attribute snapshots, that is a second copy of sensitive data with its own retention, encryption, and erasure obligations — an entirely different compliance conversation. Resolve it before scoping anything downstream.

How to Pitch It (Stakeholders)

For executives: Reanimate is a small, free utility that lets us ship "undo delete" and basic record recovery faster, with no schema change and no vendor commitment. It reduces a recurring class of accidental-deletion support tickets and gives users a visible trust signal for roughly a day of integration. Risk is bounded on both sides: it's a thin layer over native Laravel behavior, and if we outgrow it or it goes unmaintained, replacing it with our own equivalent is a small, well-understood piece of work. Recommendation: treat it as a validated reference, not a permanent dependency — adopt it to prove the feature is worth building, then decide whether to keep or own the code.

For engineering: It wraps Laravel soft deletes with a fluent restore API and handles restoring related soft-deleted records alongside the parent — the one part worth not writing ourselves. Integration is trivial: install, add the trait to an explicit allowlist of models (never a shared base model), no data migration in the soft-delete reading. Three caveats drive the recommendation. First, security is the real cost, not wiring: the package's job is exposing deliberately hidden records, so its routes need your auth middleware, per-model policy checks, and explicit tenant scoping — or we've built an endpoint over our most sensitive data. Wrap every restore in a transaction, guard with abort_unless($model->trashed(), 409), add ->withTrashed() to route bindings, and listen on the restored event for audit, search re-index, cache busting, and downstream webhooks. Second, it is not a recycle bin — no UI, permissions, retention, or bulk semantics; those are ours to build and are where the effort actually lives. Third, we own it on adoption: pin the version, keep it vendored or forked, and plan for the possibility that reimplementing it behind our own controller and policies is a scoped afternoon rather than a rewrite.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib