lara-zeus/tartarus
Tartarus is a Laravel package from Lara Zeus for adding access control to your application. It offers a clean, configurable setup that fits Laravel’s authorization conventions and keeps role and permission management straightforward.
Architecture fit
src/ — not the README — before it enters a planning document. If tenancy is the requirement, this is not the package; the correct comparison set is stancl/tenancy or spatie/laravel-multitenancy.SoftDeletes trait and surfaces restore/force-delete through Filament. It is an admin-surface package, not infrastructure. It does not change how your domain models persist, so it does not force an architectural decision beyond "do we use soft deletes here."Integration feasibility
deleted_at. That single fact determines the whole integration strategy.restore() clears deleted_at and nothing else. Any deletion with side effects — cancelled subscription, revoked invite, archived file, sent notification — needs a compensating action on restore. This is our work, not the package's, and it is the single largest hidden cost in the estimate.Technical risk
[email protected], someone re-registers with it, restoring the original violates the unique index. The package cannot solve this. Per-model policy required: block with a clear notification, merge, or suffix.tenant_id. If the package's internal queries use withoutGlobalScopes() — common in admin tooling to avoid scoping surprises — a support user could restore a record into visibility they should not have. Grep the source for withoutGlobalScopes, withoutGlobalScope, and raw DB::table( before shipping. This is the highest-severity item in the whole evaluation.restore() on a parent does not restore children; force-deleting a parent whose children were force-deleted or orphaned is the failure mode. FK onDelete behaviour must be checked against what the package actually issues.Key questions
src/.deleted_at directly?Stack fit
SoftDeletes coverage across the domain is the real substrate. Audit which models currently use it before promising a "recycle bin for everything." Adding the trait is a schema-adjacent change with withTrashed(), unique-index, and relationship implications that propagate.Migration path
Compatibility
composer.json. The upgrade cadence is Dependabot-driven, so version drift is not a hardening signal and should not be treated as one.routes/console.php vs. Kernel::schedule()).Sequencing
canForceDelete(), restore guards for unique constraints, restore observers for parent/child models.Extension points, in order of preference: Filament action hooks and lifecycle callbacks → model observers and events → published config → subclassing the shipped resource → forking. The first two cover most needs and survive upgrades; the last two are where upgrade cost accumulates.
Maintenance
Support
activity_log.Scaling
onlyTrashed() queries. Standard admin-table scaling concerns; index deleted_at on high-volume tables.auth()->user() or session state, it will be null or wrong. Pass the acting user ID explicitly into dispatched jobs.Failure modes
| Failure | Detection | Blast radius |
|---|---|---|
| Pruning job silently stops | Nothing until disk fills or compliance ask | Retention promise broken; unbounded growth |
| Tenant scope bypass in package queries | Only via source audit or a security test | Cross-tenant restore — highest severity |
| Unique-constraint collision on restore | Surfaces in production within a week | Support staff blocked; manual DB workaround |
| Parent restored, children left trashed | User-visible half-alive record | Data integrity confusion; repeat tickets |
| Force-delete by the wrong person | Audit log, if we built one | Irreversible data loss |
| Filament upgrade breaks the resource | At deploy time, if tests exist; in production if not | Admin panel degradation |
| Restore not idempotent / duplicate actions | Repeated restore attempts | Inconsistent state, noisy logs |
Ramp-up
Recommendation for a TPM: treat this as a low-cost, high-clarity pilot with a hard validation gate. Approve a half-day spike on one model, contingent on the source read confirming the recycle-bin shape and the tenant-scoping audit coming back clean (or the app being single-tenant). Do not approve a broad rollout until the retention policy is written down, force-delete is policy-gated, and per-model tests exist. The upside is modest but real — a class of support tickets disappears. The downside is bounded, because the package is small enough to fork or abandon at low cost. The one thing that must not be discovered late is tenant scoping: on a multi-tenant system, that is a security issue, not a convenience one.
How can I help you explore Laravel packages today?