promethys/revive
Revive adds a central Recycle Bin to FilamentPHP apps, letting you view, restore, or permanently delete soft-deleted Eloquent models in a few clicks. Register models with a trait, filter by type, and recover deleted data fast.
Architecture fit
Recyclable trait and the tracking/discovery layer, and the Livewire table is still Filament-shaped.Recyclable trait, a plugin registration per panel, and a dedicated page. It layers on top of Laravel's SoftDeletes rather than replacing it, so withTrashed()/onlyTrashed() semantics and existing restore paths remain intact.revive:discover-soft-deleted exists precisely because the tracking table can drift from reality).Integration feasibility
composer require, revive:install, register RevivePlugin::make() in the panel, add the trait to target models. Config is fluent and discoverable (authorize, navigationGroup, models, scoping flags).showAllRecords(), and an authorize() closure give us distinct user/admin/tenant panels without forking.@livewire(\Promethys\Revive\Tables\RecycleBin::class) outside a panel is a viable escape hatch for one-off screens.Technical risk
revive:install republishes migrations with fresh timestamps on spatie/laravel-package-tools < 1.93.1. That is a dependency-floor footgun for teams that pin older versions.Key questions
onlyTrashed() Filament resource sufficient? Building that in-house is days, not weeks, and removes the dependency entirely.Stack fit
filament()->getTenant(), so it inherits our tenancy model rather than inventing one.Migration path
^3.0 for Filament v5) rather than floating. The three-track release strategy makes an unpinned constraint a latent upgrade hazard.revive:install once, verify migration idempotency against our spatie/laravel-package-tools version, and commit the published migration so future install runs cannot re-timestamp it.revive:discover-soft-deleted --dry-run first in staging, then --with-scope, targeting the correct --panel (defaults to the default panel, which may not be the one configured with modelsNamespace()).Compatibility
SoftDeletes must be present alongside Recyclable or the trait throws. Enforce this at CI (a small test that iterates registered recyclable models) rather than discovering it at runtime.App\Models rather than augmenting it — an easy mistake that silently empties the bin.Sequencing
Comment) to validate install, scoping, and restore behavior end to end.showAllRecords() with authorize()), since panel config is where misconfiguration causes data leakage.Maintenance
Support
Scaling
->models([...]) to genuinely recoverable entities and exclude high-churn tables.showAllRecords() on an admin panel will not, and should be paginated/guarded.Failure modes
modelsNamespace() — logged, never fatal. Needs an alert or a smoke test.revive:install on older laravel-package-tools.showAllRecords() is configured on a tenant panel or authorize() is a static true.Ramp-up
onlyTrashed() Filament resource plus restore/force-delete actions) available from a very thin dependency. Adopt it to save a few days, but treat it as a fork candidate from day one and keep the in-house alternative costed — at 16 stars and 0 dependents, the build-vs-buy line is closer than the convenience suggests.How can I help you explore Laravel packages today?