marquine/eloquent-uuid
最新稳定版本:v1.2.0
Composer 安装命令:
composer require marquine/eloquent-uuid
包简介
Uuid primary key for Laravel Eloquent Models
关键字:
README 文档
README
Uuid primary key for Laravel Eloquent Models.
Installation
Install through Composer
composer require marquine/eloquent-uuid
Usage
Database table
In your migration, create a column for the uuid primary key:
$table->uuid('id')->primary();
or
$table->string('id', 32)->primary();
If your primary key column name is not id, you need to set the model's $primaryKey property to the correct name.
Model
Use the Uuid trait in your model:
<?php namespace App; use Marquine\EloquentUuid\Uuid; use Illuminate\Database\Eloquent\Model; class User extends Model { use Uuid; }
License
Eloquent UUID is licensed under the MIT license.
统计信息
- 总下载量: 11.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-24