PHP code example of jialeo / laravel-schema-extend
1. Go to this page and download the library: Download jialeo/laravel-schema-extend library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jialeo / laravel-schema-extend example snippets
'aliases' => array(
...
// 'Schema' => Illuminate\Support\Facades\Schema::class,
'Schema' => Jialeo\LaravelSchemaExtend\Schema::class,
),
Schema::create('tests', function ($table) {
$table->increments('id')->comment('列注释');
$table->comment = '表注释';
$table->integer('int')->default(1)->length(1);
$table->bigInteger('big')->default(1)->length(1);
$table->smallInteger('small')->default(1)->length(1);
$table->tinyInteger('tiny')->default(1)->length(1);
$table->mediumInteger('medium')->default(1)->length(1);
});