1、引用DB
use Illuminate\Support\Facades\DB;
2、up方法
public function up()
{
Schema::create('code_table', function (Blueprint $table) {
$table->integer('id')->unsigned()->primary()->comment('这是字段注释');
});
DB::statement("ALTER TABLE `code_table` comment '这是表注释'");
}