bluora / laravel-model-uuid
1.0.9
2018-05-30 04:48 UTC
Requires
- php: >=7.0
- webpatser/laravel-uuid: 3.*
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- illuminate/database: 4.*|5.*
- phpunit/phpunit: 4.*
- symfony/process: ~2.3
README
__ ____ ____ __________
/ / ____ __________ __ _____ / / / / / / / / _/ __ \
/ / / __ `/ ___/ __ `/ | / / _ \/ / / / / / / // // / / /
/ /___/ /_/ / / / /_/ /| |/ / __/ / /_/ / /_/ // // /_/ /
/_____/\__,_/_/ \__,_/ |___/\___/_/\____/\____/___/_____/
为模型添加 UUID 数据类型列的支持。
此包由澳大利亚精品开发商 H&H|Digital 开发。欢迎访问我们的网站 hnh.digital。
安装
通过 composer
$ composer require hnhdigital-os/laravel-model-uuid ~1.0
使用方法
基本使用
该功能通过将 UUID 列转换为 uuid
来通过 trait 暴露。
use Bluora\ModelUuidColumn\UuidTrait; class User extends Model { use UuidTrait; protected $casts = [ 'id' => 'integer', 'uuid' => 'uuid' ]; }
查询 UUID 列
然后,您可以通过 whereUuid
(单个 uuid)和 whereUuidIn
(多个 uuid)方法查询 UUID 列。
贡献
有关详细信息,请参阅 CONTRIBUTING。
致谢
许可
MIT 许可证 (MIT)。请参阅 许可文件 获取更多信息。