hnhdigital-os/laravel-model-uuid
Composer 安装命令:
composer require hnhdigital-os/laravel-model-uuid
包简介
Provides UUID datatype support for the Eloquent ORM
README 文档
README
__ ____ ____ __________
/ / ____ __________ __ _____ / / / / / / / / _/ __ \
/ / / __ `/ ___/ __ `/ | / / _ \/ / / / / / / // // / / /
/ /___/ /_/ / / / /_/ /| |/ / __/ / /_/ / /_/ // // /_/ /
/_____/\__,_/_/ \__,_/ |___/\___/_/\____/\____/___/_____/
Adds support for the UUID datatype column for models.
This package has been developed by H&H|Digital, an Australian botique developer. Visit us at hnh.digital.
Installation
Via composer:
$ composer require hnhdigital-os/laravel-model-uuid ~1.0
Usage
Basic
The feature is exposed through a trait by casting your UUID columns as uuid.
use Bluora\ModelUuidColumn\UuidTrait; class User extends Model { use UuidTrait; protected $casts = [ 'id' => 'integer', 'uuid' => 'uuid' ]; }
Querying the UUID column
You can then query the UUID column through whereUuid (single uuid) and whereUuidIn (many uuid's) methods.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 250
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-08