定制 larastuffs/primary-uuid 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

larastuffs/primary-uuid

Composer 安装命令:

composer require larastuffs/primary-uuid

包简介

Use UUID as primary key on Laravel Models

README 文档

README

Packagist Version License

this package provides a simple interface for using UUID as a primary key in models

Requirements

  • PHP 7.2 or latest
  • Laravel 6.* | 7.* | 8.*

Installation

Require this package with composer using the following command:

composer require larastuffs/primary-uuid

Usage

Follow the instructions to adapt your models and migrations

Model Setup

<?php
use ...;
use LaraStuffs\PrimaryUUID\Eloquent\Concerns\UseUUIDAsPrimaryKey;

class MyModel extends Model {
 
    use UseUUIDAsPrimaryKey;
 
    ...
}

Migration Setup

<?php
Schema::create('table_name', function (Blueprint $table) {
    $table->uuid('id')->primary();
});

Possible incompatibilities

if you use closures to define your model events, I strongly recommend that you use model observers instead

Contributing

Contributions are more than welcome. Fork, improve and make a pull request. For bugs, ideas for improvement or other, please create an issue.

统计信息

  • 总下载量: 72
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固