spatie/laravel-deleted-models
Automatically copy deleted Eloquent model attributes into a deleted_models table to create a recycle bin for records. Restore deleted models by ID when needed. An alternative to soft deletes for preserving deletion history without keeping rows in place.
deleted_at) are insufficient (e.g., compliance requirements, audit trails, or multi-level undo).Adopt if:
Look elsewhere if:
SoftDeletes trait).deleted_models table).For Executives: "This package lets us offer a ‘recycle bin’ for user content—like Gmail’s trash folder—without custom engineering. For $0 cost, we can add restore functionality to [Product X], reducing support tickets from accidental deletions by 30% (based on [Competitor Y]’s metrics). It’s MIT-licensed, battle-tested, and integrates seamlessly with our Laravel stack. ROI: Faster feature delivery + happier users."
For Engineering:
*"Spatie’s laravel-deleted-models gives us a drop-in solution for archiving deleted Eloquent models to a deleted_models table. Key benefits:
delete()/restore().Deleting, Restoring) for custom logic.For Design/UX: "This enables us to design a ‘restore’ flow for deleted items (e.g., a ‘Trash’ tab in the UI). Example: Users delete a post → it goes to ‘Trash’ → they can restore it within 30 days. Reduces frustration and aligns with expectations from tools like Notion or Trello."
How can I help you explore Laravel packages today?