dev-master
9999999-dev https://github.com/VistagGit/eloquent-uuidEloquent models UUID traits
MIT
The Requires
- php ^5.4 || ^7.0
- ramsey/uuid ^3.7
The Development Requires
laravel uuid identifier guid eloquent trait
Eloquent models UUID traits
Laravel package with Eloquent models UUID1 and UUID4 traits that will let you generate UUIDs for your Eloquent models automatically., (*1)
You can install this package via composer using this command:, (*2)
``` bash composer require vistag/eloquent-uuid, (*3)
## Usage ### Models To set up a model to use UUID, simply use HasUuid1 or HasUuid4 trait. #### UUID1 Example ``` php use Illuminate\Database\Eloquent\Model; use Vistag\EloquentUuid\HasUuid1; class Item extends Model { use HasUuid1; .... }
``` php use Illuminate\Database\Eloquent\Model; use Vistag\EloquentUuid\HasUuid4;, (*4)
class Item extends Model { use HasUuid4;, (*5)
...., (*6)
} ```, (*7)
If you believe you have found an issue, please report it using the GitHub issue tracker, or better yet, fork the repository and submit a pull request., (*8)
If you're using this package, I'd love to hear your thoughts. Thanks!, (*9)
The MIT License (MIT). Vistag.com, (*10)
Eloquent models UUID traits
MIT
laravel uuid identifier guid eloquent trait