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

Eloquent Keygen Laravel Package

jetcod/eloquent-keygen

Laravel package that integrates Snowflake ID generation with Eloquent models, giving you automatic, distributed, unique primary keys via a base model or trait, with per-model opt-out and configurable settings for scalable applications.

View on GitHub
Deep Wiki
Context7
1.2.0

Eloquent KeyGen v1.2.0

This release modernizes Eloquent KeyGen’s PHP and Laravel compatibility, improves sequence-resolver reliability, and ensures Snowflake IDs are generated only when models are created.

Breaking changes

  • The minimum runtime is now 64-bit PHP 8.1.
  • Supported Laravel versions are now Laravel 10 through Laravel 13.
  • godruoyi/php-snowflake 3.2 or newer is required.
  • PrimaryKeyGenerator::generate() now declares a string return type.
  • Applications overriding this method must add a compatible return type.

Improvements

  • Generate Snowflake IDs during Eloquent’s creating event instead of saving.
  • New records continue receiving generated IDs automatically.
  • Updating an existing model no longer invokes ID-generation behavior.
  • Create the default file-lock directory through Laravel’s filesystem service.

Compatibility and tooling

Add compatibility coverage for:

  • PHP 8.1 with Laravel 10
  • PHP 8.2 with Laravel 11 and 12
  • PHP 8.3–8.5 with Laravel 13
  • Upgrade PHPStan to 2.2 with strict rules and level 8 analysis.
  • Support PHPUnit 10 through 13.
  • Add PCOV coverage generation and Codecov integration.
  • Add focused tests for sequence-resolver registration, filesystem behavior, and model ID lifecycle.
v1.1.0

New Features and Improvements

Refactored Logic into Trait:

  • The core logic previously embedded within the base model has been moved to a trait. This provides greater flexibility and modularity.
  • Users now have the option to include the trait in their own models, allowing them to easily adopt and utilize the core logic without being tied to the base model.

Enhanced Base Model:

  • The base model now uses the newly created trait, ensuring that all existing functionality remains intact while benefiting from the refactored and more maintainable code structure.
1.0.0

Initial release

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.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log