承接 marquine/eloquent-uuid 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-24