mindtwo/laravel-auto-create-uuid
Auto-fill a UUID v4 on Eloquent models when creating or replicating. Add a trait, add a uuid column, and it just works—no config. Supports custom UUID column names and ensures replicas get a fresh UUID by excluding the UUID attribute on replicate.
pint.json) using the laravel preset.phpstan.neon.dist) at level 8 with Larastan.$uuid_column property, the overridable
getUuidColumn() method, and validation of pre-set UUIDs.keywords, expanded description, and additional README badges in
composer.json.Ramsey\Uuid\Uuid::isValid() to Laravel's
Str::isUuid() to avoid a direct dependency on the Ramsey package.run-tests, phpstan,
fix-php-code-style-issues, and update-changelog now reference the
master branch consistently and the test matrix covers PHP 8.2 - 8.4 against
Laravel 10 - 13.prepare, build,
start, clear, post-autoload-dump)..travis.yml, .scrutinizer.yml, .styleci.yml, .php_cs.dist, and
.phpunit-watcher.yml configuration files.ramsey/uuid in the trait (still installed transitively
via illuminate/support).illuminate/support: ^13.0).array $except = null parameter type on
replicate() with the explicit nullable syntax ?array $except = null,
silencing a PHP 8.4 deprecation warning.illuminate/support: ^12.0).illuminate/support: ^11.0).phpunit.xml.dist for PHPUnit 10.illuminate/support: ^10.0).replicate() override now excludes the UUID column from the cloned
attributes so the replica receives a fresh UUID via the replicating
event.fillUuidColumn() method that powers both the creating and
replicating event listeners.illuminate/support: ^9.0).illuminate/support: ^8.0).illuminate/support: ^7.0).illuminate/support: ^6.0).AutoCreateUuid trait that fills a model's
uuid column on creating and exposes a getUuidColumn() hook plus an
optional $uuid_column property to customize the column name.How can I help you explore Laravel packages today?