julianstark999/laravel-model-iid
Laravel package that adds a compact, auto-incrementing IID column to Eloquent models, giving records a short human-friendly identifier for URLs, support tickets, and admin views while UUIDs or ULIDs remain the real primary key.
The package is a Laravel/PHP component at a very early maturity stage (0.1.x), and the only artifact available for review is the 0.1.2 release note: "added soft deleting." There is no prior assessment, changelog history, README excerpt, or compatibility matrix in the supplied data, so this evaluation is necessarily provisional and should be treated as a risk-framed hypothesis rather than a verified position.
Architecture fit. Soft deletes are a first-class Laravel idiom (SoftDeletes trait, deleted_at column, withTrashed/onlyTrashed/restore/forceDelete). If the package now respects that convention, it aligns well with idiomatic Laravel and reduces the need for bespoke archival logic in consuming applications. The key architectural question is where the soft-delete behavior lives: on the package's own models, on a pivot/association table, or as a configurable concern applied to host-app models. Each choice has different blast radius.
Integration feasibility. Adding soft deletes is typically a low-ceremony change for consumers — a migration to add deleted_at (nullable timestamp, indexed) plus trait usage. Feasibility is high if the package ships its own migrations and publishes them; it drops sharply if consumers are expected to hand-edit schemas or if the package assumes a column naming convention it does not document.
Technical risk. The dominant risks are behavioral rather than syntactic:
deleted_at is folded into the index.withTrashed eager loads, relationship resolution, or resource transformers, leaking "deleted" data to consumers.Key questions.
forceDelete remain entirely the consumer's responsibility?withTrashed scopes exposed deliberately, or do consumers need to reach into package internals?Stack fit. Soft deletes are native to Laravel's Eloquent layer and require no additional infrastructure — no queue, no cache, no external store. This is a favorable fit for any Laravel 8+/9+/10+ application already using Eloquent. The change is contained to the data layer and does not introduce new runtime dependencies or services.
Migration path. The migration story must be explicit before adoption. The expected shape is: (a) package publishes a migration adding a nullable, indexed deleted_at; (b) consumer runs php artisan migrate; (c) trait is applied to package-owned models automatically, with host-app models unaffected unless opted in. Consumers on 0.1.1 should be able to upgrade without data backfill, since existing rows default to NULL (not deleted). If the package instead backfills or rewrites rows, that must be called out as a breaking operational step.
Compatibility. Two axes matter. First, Laravel version support for SoftDeletes is broad and stable, so framework compatibility risk is low. Second, behavioral compatibility with the consumer's own code is the real concern: any package API that returns collections, counts, or existence checks may now return different results. Consumers should treat 0.1.2 as behavior-changing even though it is a patch version.
Sequencing. Recommended order:
deleted_at where needed.restore, forceDelete should not be silently exposed).Maintenance. The package is pre-1.0 and the release note is a single line with no migration guide, no deprecation notice, and no test evidence. That implies a high-touch maintenance posture: expect to read source diffs rather than changelogs, and budget for version pinning. Soft deletes also add a permanent schema concern — the deleted_at column and its index become part of the consumer's data model indefinitely.
Support. Support burden shifts to the consumer's own teams. The most common inbound issues will be "why did my record disappear from a list?" and "why can't I recreate a record with the same slug/email?" Both are soft-delete artifacts. Teams should pre-write runbook entries for restoring and force-deleting records, including who is authorized to do each.
Scaling. Storage grows monotonically until a purge process exists. Indexed deleted_at keeps the default-scope query plan healthy, but tables will bloat and vacuum/optimize costs rise. Report and analytics queries that legitimately need all rows must consistently use withTrashed, or dashboards will silently under-count — a scaling problem that manifests as a data-trust problem.
Failure modes. The realistic failure set is: silent under-counting in analytics; unique-constraint violations on re-creation; orphaned or unreachable relationship graphs after partial restores; accidental exposure of trashed records through API resources or admin tooling; unrestorable data once forceDelete is used without backups; and upgrade risk from an undocumented 0.1.x change. None are exotic; all are predictable and mitigable with a regression suite and a written retention policy.
Ramp-up. Low conceptual ramp-up — any Laravel developer knows soft deletes — but non-trivial organizational ramp-up. The work is less "learn the API" and more "agree on retention, authorization for restore/purge, and query conventions." Estimate a short engineering lift (hours) and a longer alignment lift (days) across product, data, and support before enabling in production. Given the 0.1.2 maturity signal, adopting now is reasonable only for internal or low-criticality surfaces; for customer-facing systems with audit or compliance requirements, hold until the package documents migration, retention, and uniqueness behavior.
How can I help you explore Laravel packages today?