PHP code example of ke / thinkphp-beautiful-migrate

1. Go to this page and download the library: Download ke/thinkphp-beautiful-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/ */

    

ke / thinkphp-beautiful-migrate example snippets


// 创建表
Schema::create($this->getAdapter(), '表名', function (Blueprint $blueprint) {
    // 迁移代码
});

// 修改表
Schema::table($this->getAdapter(), '表名', function (Blueprint $blueprint) {
    // 迁移代码
});