table, function (Blueprint $table) { $table->increments('id')->comment('唯一标识')->unsigned(); $table->integer('cid')->comment('对应课程id')->unsigned(); $table->integer('uid')->comment('对应会员id')->unsigned(); $table->timestamps(); $table->foreign('cid')->references('id')->on($this->tb_cors); $table->foreign('uid')->references('id')->on($this->tb_users); }); DB::statement("ALTER TABLE ".$this->table." comment'课程报名信息表'"); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists($this->table); } }