tenantcloud/laravel-boolean-softdeletes
Laravel soft deletes backed by a boolean column instead of a nullable timestamp. A drop-in trait keeps the familiar SoftDeletes API while making delete checks and indexes faster and simpler, ideal for high-volume tables where a deleted flag beats deleted_at comparisons.
deleted_at for a boolean flag, which is the right primitive when a record's deletion state must participate in compound unique indexes (e.g. one active account per email, unlimited archived ones) or when "is this row live?" needs to be a cheap indexed boolean predicate rather than a NULL check.Adopt when:
deleted_at IS NULL + unique index conflict. A boolean column gives you UNIQUE(email, is_deleted) style indexes that behave predictably across MySQL, PostgreSQL, and SQLite.Look elsewhere or stay on timestamps when:
deleted_at — Eloquent's trashed(), onlyTrashed(), restore(), Prunable, and most Laravel ecosystem packages (admin panels, audit trails, Nova/Filament filters) assume timestamps. Migration cost is real.app/Models/Concerns may be cheaper than a dependency, and avoids a vendor-owned core data concern.Also note this is a single-vendor package from TenantCloud with a modest contributor base. v7.0 being a major version bump with no documented BC breaks beyond framework support suggests the major was cut for the Laravel 12 floor — confirm the minimum PHP/Laravel versions before planning the upgrade, and check whether v7 still supports the Laravel version you're currently on if you're mid-upgrade.
For executives: This is a small infrastructure dependency, not a product feature. The relevant news is that v7.0 adds support for Laravel 12, which removes a blocker from our framework-upgrade timeline. There is no new user-facing capability and no commercial impact. The decision it informs is a technical one — whether to standardise how we mark records as "removed but retained" — and the risk is low and reversible.
For engineering: v7.0 is a compatibility and performance release. It brings Laravel 12 support and optimises migration performance, which lowers the cost of adopting boolean soft deletes on existing large tables. We should confirm the minimum PHP/Laravel version for v7 and check the diff for any silent BC changes to the trait's scopes before bumping. The substantive architectural question is separate from the release: timestamp-based deleted_at is woven through Laravel's own APIs and most of the ecosystem, so adopting boolean deletes is a deliberate trade — we gain clean compound-unique indexes and a cheaper "is live" predicate, and we give up free deletion timestamps and out-of-the-box compatibility with tooling that assumes deleted_at. Recommendation: treat the upgrade as routine, and evaluate the boolean-soft-delete pattern only for tables where the unique-index problem actually bites.
How can I help you explore Laravel packages today?