laravel-json-api/boolean-softdeletes
Adds boolean soft delete support to Laravel JSON:API resources. Rather than a deleted_at timestamp, models are flagged with a boolean column, so trashed records stay visible and filterable through your API while normal queries still exclude them.
deleted_at timestamp. It removes a concrete blocker to adopting yocto/illuminate-database-softdeletes (an indexed boolean column) behind a standard JSON:API surface. That is a real product-adjacent decision for high-volume tables where an indexed boolean is smaller and faster than a nullable timestamp index, and where "is this deleted?" is the only question the query layer asks.laravel-json-api — it shortens the distance from roadmap item to demo.?include_deleted=true style flags that accumulate as permanent inconsistencies.Consider it when:
laravel-json-api and to the yocto/illuminate-database-softdeletes trait, or is actively evaluating that trait for measured performance reasons.GET /api/posts?filter[trashed]=with plus a PATCH restore round-trip on one low-risk model — rather than as a mid-sprint platform change.Look elsewhere when:
laravel-json-api, or uses Laravel's native SoftDeletes. The value only exists at that exact intersection; elsewhere it adds nothing.For executives: This is a free, Apache-2.0 licensed adapter that closes a small but real integration gap. It lets us expose "delete, restore, permanently delete" behavior through our standard JSON:API interface while using a faster boolean-based soft-delete data model. License cost is zero; the real ask is a short engineering spike plus, if adopted, the discipline to vendor the code so we own it. It is not a strategic platform decision — it is a tactical enabler with low downside because the code is small and the license is permissive. Note the risk profile honestly: near-zero adoption means no upstream safety net, so the recommendation is approve the spike, not a committed dependency, and defer the production decision to the spike's results.
For engineering: The package connects the yocto/illuminate-database-softdeletes trait to laravel-json-api so schema adapters, the filter[trashed] values (with / only), and restore/force-delete actions work against a boolean column instead of deleted_at. It is glue at the persistence/API seam, and only pays off if we are already on both halves of the stack. Plan for: reading the vendor source rather than trusting the README (namespaces and the Yocto default column name vary by version), pinning the full compatibility matrix, and writing contract tests for the lifecycle — trashed filtering across all values, pagination and includes over trashed collections, restore round-trip, force-delete, route binding of trashed resources (restore returning 404 is a classic failure), authorization on trashed retrieval, and correct exclusion of deleted records from default listings. Assume we own maintenance: vendor the code, name a maintainer, and write the fork-and-own exit plan into the decision record before it reaches production.
How can I help you explore Laravel packages today?