Laravel 数据迁移添加表注释

use Illuminate\Support\Facades\DB;

public function up()
{
    Schema::create('h5_version', function (Blueprint $table) {
        $table->bigIncrements('id');
        $table->timestamps();
    });
    DB::statement("alter table `tabelName` comment '表注释' ");
}

参考文档

Laravel 数据迁移给表添加注释 | Laravel China 社区

你可能感兴趣的:(PHP,php,laravel)