Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Globalid Laravel

Globalid Laravel Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Identify app models with a URI. Inspired by the globalid gem.

Frequently asked questions about Globalid Laravel
What is tonysm/globalid-laravel used for?
It is a Laravel package for identifying Eloquent model records with stable gid:// strings, inspired by the Rails GlobalID gem. It is useful when model references cross a trust boundary, such as queued jobs, webhook payloads, public APIs, or URLs that should not expose sequential primary keys. It is infrastructure plumbing rather than an end-user feature package.
How do I install and configure GlobalID in a Laravel app?
Install it with Composer, publish the package config, register the model locators you need, and use the package helpers or traits where you generate or parse GIDs. Exact commands and API names are in the repository README. Plan to audit every place a GID is produced or consumed, including API responses, signed URLs, queued payloads, and stored columns.
Which Laravel versions does tonysm/globalid-laravel support?
The provided context does not list supported Laravel or PHP versions, so check the package composer.json and README before adding it to an existing application. For production adoption, verify compatibility against your Laravel version, PHP version, queue driver, and deployment process. This matters because GID resolution may run inside queued jobs and across multiple workers.
How do I generate and parse a gid:// string for an Eloquent model?
The package generates and parses gid:// strings that resolve back to an Eloquent model instance. Use the provided helpers or model traits to create a GID for a record and to resolve a GID back to its model. Because version 1.5.0 only resolves registered locators, make sure the relevant model locator is registered before relying on parsing.
What is the difference between a GlobalID and a signed GlobalID?
A GlobalID is an opaque gid:// reference to a model record, while a signed GlobalID adds signing and can be used for secure expiration. Use signed GlobalIDs when a reference is exposed to users or third parties and needs tamper resistance or a time limit. Use standard GIDs for internal references where you control the trust boundary.
Why does my GlobalID fail to resolve after upgrading to 1.5.0?
Version 1.5.0 changed resolution so only registered locators are returned and removed the general fallback to arbitrary class resolution. If your app relied on implicit resolution, previously working GIDs can start failing. Register the missing locators and test round-trip encode/decode across deploy boundaries, queue replay, and cached responses.
Is the 1.5.0 locator fallback removal a breaking change?
The release notes do not mark it as breaking, but it changes resolution semantics and should be treated as a behavioral break. Risk is highest in applications that never explicitly registered locators and relied on fallback resolution. Audit which services resolve GIDs without explicit locator registration, because that set defines your real breaking-change surface.
How does encryption key rotation work in globalid-laravel 1.5.0?
Version 1.5.0 adds support for rotating the encryption key, so rotating APP_KEY or the package cipher key no longer has to invalidate every outstanding GID. The evaluation notes a current-key-plus-previous-key model, so design around how many historical keys you retain. Confirm whether stored GIDs can be re-encrypted or whether old keys must be kept indefinitely, and test rotation across horizontally scaled workers.
How should I handle GlobalID resolution failures in queued jobs?
Resolution failures can surface as ModelNotFoundException or a null return, which can be easy to swallow in try/catch blocks. In queued jobs, a failed resolution can mean dropped jobs or repeated retries instead of a clean client error. Register all expected locators, log or meter resolution failures, and test queue replay after deployment.
What alternatives to GlobalID should Laravel developers consider?
Alternatives include UUIDs or ULIDs, signed URLs, encrypted route parameters, or API tokens depending on your threat model. GlobalID's value is resolving an opaque string back to an Eloquent model while avoiding raw sequential IDs. Compare options on key rotation, storage at rest, queue behavior, expiration requirements, and monitoring of resolution failures.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle