bdelespierre / laravel-has-uuid
为Eloquent模型提供UUID键类型的支持
v1.2.1
2023-10-09 14:46 UTC
Requires
- php: ^7.1|^8.0
- illuminate/support: ~10
- webpatser/laravel-uuid: ^4.0
Requires (Dev)
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-09 16:59:04 UTC
README
Laravel Has UUID
为Eloquent模型提供UUID主键的支持。基于webpatser/laravel-uuid ❤️
安装
通过Composer
$ composer require bdelespierre/laravel-has-uuid
使用方法
namespace App\Models; use Bdelespierre\HasUuid\HasUuid; use Illuminate\Database\Eloquent\Model; class User extends Model { use HasUuid; }
迁移
Schema::create('users', function (Blueprint $table) { $table->uuid('id')->primary(); // other properties go here... });
变更日志
请参阅变更日志了解最近的变化。
测试
$ composer test
贡献
请参阅contributing.md了解详细信息和一个待办事项列表。
安全
如果您发现任何安全相关的问题,请发送电子邮件至benjamin.delespierre@gmail.com,而不是使用问题跟踪器。
鸣谢
许可证
MIT. 请参阅许可证文件获取更多信息。