5-say / laravel-schema-extend by 5-say

support MySQL 'column comment' and 'table comment'.
662
52
7
Package Data
Maintainer Username: 5-say
Maintainer Contact: bcw.5@foxmail.com (FiveSay)
Package Create Date: 2014-08-28
Package Last Update: 2015-05-26
Home Page:
Language: PHP
License: Unknown
Last Refreshed: 2024-11-19 03:17:34
Package Statistics
Total Downloads: 662
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 52
Total Watchers: 7
Total Forks: 10
Total Open Issues: 2

laravel-schema-extend

  • support MySQL 'column comment' and 'table comment'.
  • 让 laravel 的 Schema 支持 MySQL “列注释”和“表注释”。

不会对官方源码照成任何影响。
继承原生 schema,随源码更新。

使用前的准备

在 composer.json 文件中申明依赖:

  • support laravel 4.1.*
"five-say/laravel-schema-extend": "1.*"
  • support laravel 4.2.*(官方已支持 MySQL “列注释”,需要“表注释”的朋友还可以继续使用此插件)
"five-say/laravel-schema-extend": "2.*"
  • support laravel 5.0.*(官方已支持 MySQL “列注释”,需要“表注释”的朋友还可以继续使用此插件)
"five-say/laravel-schema-extend": "3.*"

在配置文件 config/app.php 中替换“别名”

'aliases' => array(
    ...
    // 'Schema' => 'Illuminate\Support\Facades\Schema',
    'Schema'    => 'FiveSay\LaravelSchemaExtend\Facade',
),

使用方法

Schema::create('tests', function ($table) {
    $table->increments('id')->comment('列注释');
    $table->comment = '表注释';
});

致谢