← Back to Packages
View on GitHub →
Package
Laravel Uuidable
PHP
Laravel
Trait for automatically assigning a UUID to Eloquent models on creation.
Overview
Uuidable provides a reusable trait for automatically assigning a UUID to Eloquent models upon creation using the Ramsey UUID library. Override fetchUuidColumn() for a custom column name.
Installation
composer require labrodev/uuidable
Tips
- • Ensure the model has a 'uuid' column (e.g. $table->uuid('uuid')).