serieseight/statamic-uuid
Statamic UUID is a lightweight addon that assigns stable, unique identifiers to entries and other content, so you can reference records reliably across environments, imports, and API integrations without depending on slugs or auto-incrementing IDs.
v2.4.0 is a small release in terms of surface area — a single PR adding Statamic v6 compatibility — but it is the release that moves the addon onto a new major version of the host CMS. Start there.
statamic/cms constraint in composer.json. On Statamic 5 you stay on ^2.3; only move to ^2.4 once the site itself is on Statamic 6.composer require aryehraber/statamic-uuid, then publish the config tag listed in the README). Read the README's fieldtype/config section first — the addon's whole API is essentially "one fieldtype plus a small config file."src/ServiceProvider.php and the fieldtype class before the docs. The behaviour you care about (when a UUID is generated, and whether an existing one is preserved) lives in the save/fieldtype lifecycle, not in configuration.Stable external identifiers. The core pattern is exposing an opaque, immutable ID to systems outside Statamic: webhooks, a mobile app, a CRM sync, JSON-LD @id, or analytics events. Keep Statamic's internal entry id internal and hand the UUID to consumers, so content restructuring (renaming collections, re-slugging, moving entries between trees) doesn't break external references.
Add to the blueprint deliberately. UUIDs are useful on collections that are read by external systems, not on every collection. Add the field per-blueprint rather than assuming a global setting, and set visibility so it renders in the publish form but isn't casually editable.
Templates. In Antlers/Blade it's just a field: {{ uuid }}. Common uses are <section id="{{ uuid }}"> for permalinkable blocks, stable keys in a JSON feed, and data-uuid attributes for client-side tracking that survive slug changes.
Ingestion and imports. When content arrives from an API or a CSV, generate/preserve the UUID at creation time in your importer rather than relying on an editor to save the entry later. Store the source system's key alongside it so re-imports are idempotent (look up by UUID, then update, rather than creating duplicates).
Backfilling existing content. For a collection that predates the field, expect to backfill. The reliable pattern is a one-off command that iterates entries, checks for an empty UUID, and saves each one — followed by php artisan statamic:stache:clear. Test on a copy of the content directory first; this is a write to every entry file.
Testing. Add the UUID field to your test blueprints/fixtures so factories and seeders produce it. Assertions on generated UUIDs should check format and stability, not a hard-coded value.
aryehraber/statamic-uuid to ^2.3 and defer. Conversely, don't upgrade this addon on a Statamic 5 site — the constraint will fight you.php artisan statamic:stache:clear after any direct file manipulation, config change, or backfill; stale stache explains most "the UUID is there but the site doesn't see it" reports.composer update.How can I help you explore Laravel packages today?