PHP code example of alicfeng / laravel-migrate

1. Go to this page and download the library: Download alicfeng/laravel-migrate 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/ */

    

alicfeng / laravel-migrate example snippets


use Illuminate\Database\Schema\Blueprint;
use AlicFeng\Migrate\Schema\Schema;

Schema::create('users', function (Blueprint $table) {
    // 注明表注释
    $table->comment = '用户基准表';
    
    // 设定自增字段梯度
    $table->auto_increment = 2;
});

[
    'aliases'=>[
        //'Schema' => Illuminate\Support\Facades\Schema::class,
        'Schema'   => AlicFeng\Migrate\Schema\Schema::class,
    ]
];