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 '這是表注釋'"); }