kra8/laravel-snowflake
Generate distributed, time-ordered Snowflake IDs in Laravel with kra8/laravel-snowflake. It offers configurable worker and datacenter IDs, sequence handling, and an Eloquent trait, giving models unique 64-bit IDs without extra services or coordination.
Architecture fit
Integration feasibility
composer require, publish config, set worker/datacenter ID via env, add trait to models, use unsignedBigInteger PKs in migrations.Technical risk
Number.MAX_SAFE_INTEGER. Must serialize as strings in API resources; otherwise JS consumers silently query the wrong record. Highest-likelihood production incident.Key questions
int or string, and is there a config to force strings?Stack fit
bigint PKs and with partitioned/sharded tables. Coexists with HasUuids/HasUlids — the decision should be per-table, not per-application.Migration path
$table->unsignedBigInteger('id')->primary(). Straightforward.Compatibility
Sequencing
Maintenance
composer.lock, route Dependabot PRs to the owning team, and review Laravel-shift compat PRs before merging.Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?