承接 noud/laravel-schema-real-binary 相关项目开发

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

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

noud/laravel-schema-real-binary

Composer 安装命令:

composer require noud/laravel-schema-real-binary

包简介

Laravel case sensive Schema column type

README 文档

README

INSERT INTO `country` (`id`, `currency`) VALUES
('demo', 'eur'),
('be', 'EUR'),
('nl', 'EUR');

INSERT INTO `currency` (`code`, `symbol`, `format`) VALUES
('eur', '', '{VALUE} {SYMBOL}'),
('EUR', '', '{SYMBOL} {VALUE}'),
('USD', '$', '{SYMBOL} {VALUE}');

Creating Columns

This Laravel package gives case sensative string fields with length and also as primary and foreign key by adding a real binary column to migrations.

migrations

    Schema::create('currency', function (Blueprint $table) {
        $table->realBinary('code', 3)->unique();
        // works as well
        // $table->char('code', 3)->charset('binary')->unique();
        // more fields
    });

    Schema::create('country', function (Blueprint $table) {
        $table->string('id')->unique();
        $table->realBinary('currency', 3);
        // works as well
        // $table->char('currency', 3)->charset('binary');

        $table->foreign('currency')->references('code')->on('currency');
    });

New Column Type

Command Description
$table->realBinary('fullname'); BINARY equivalent column with length 255
$table->realBinary('code', 3); BINARY equivalent with a length

Available Column Type

Command Description
$table->char('code', 3);
$table->char('name', 100);
CHAR equivalent column with a length.

used together with

Modifier Description
->charset('binary'); Specify a character set for the column (MySQL)
make the column equivalent with BINARY.

inspirations

This Laravel package is inspired by

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固