tonysm/globalid-laravel
GlobalID for Laravel brings Rails-style global identifiers to Eloquent models. Generate and parse stable gid:// strings for any model record, create signed GlobalIDs for secure expiration, and use them in jobs, URLs, and APIs without exposing raw IDs.
Adopt when most of the following hold:
Look elsewhere when:
Hashids-style approaches are simpler and avoid a dependency.For executives: A small, low-risk dependency that stops our public links and API payloads from exposing guessable record IDs. The new release (1.5.0) adds key rotation, so we can adopt a scheduled rotation policy — a control auditors ask about — without breaking links already in the wild or jobs already queued. Cost is a dependency plus a short upgrade task; there is no user-visible change.
For engineering: 1.5.0 is a minor-version release with a breaking behavior change: locator resolution no longer falls back to a general resolver and will only return explicitly registered locators. Before upgrading, audit any code path that relied on implicit resolution and register those models; unregistered references will now fail to resolve (expect exceptions on old payloads). Second change is additive: encryption key rotation, which lets old and new keys coexist so previously issued GlobalIDs still verify while new ones are signed with the current key — wire it into your key management and add a rotation runbook. Budget a half-day for the audit and a regression test around job serialization; the upgrade is otherwise mechanical.
How can I help you explore Laravel packages today?