Download the PHP package lucadello91/eloquent-uuid without Composer
On this page you can find all versions of the php package lucadello91/eloquent-uuid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lucadello91/eloquent-uuid
More information about lucadello91/eloquent-uuid
Files in lucadello91/eloquent-uuid
Package eloquent-uuid
Short Description Laravel Eloquent Model trait for using UUID on primary key
License MIT
Homepage https://github.com/lucadello91/eloquent-uuid
Informations about the package eloquent-uuid
Eloquent UUID
An Eloquent UUID Trait to use with Laravel > 5.6
Installation
composer require lucadello91/eloquent-uuid
In your models
For using uuid in your Eloquent Model, just put use UuidModelTrait;
:
This package will use UUID v4 values by default.
You can use uuid1
, uuid3
, uuid4
, uuid5
or ordered
by setting the protected property $uuidVersion
in your Eloquent Model.
Database Schema
When using UuidModelTrait, you have to use uuid
your schema :
Binary Uuid
If you prefer to use a binary UUID in your database, you just need to cast your primary key to uuid
Running tests
To run the tests, just run composer install
and ./vendor/bin/phpunit
.
Changelog
Please see CHANGELOG for more information what has changed recently.
Credits
- Luca Dell'Orto
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of eloquent-uuid with dependencies
illuminate/database Version ^8|^9|^10
illuminate/support Version ^8|^9|^10
ramsey/uuid Version ^3|^4