/** * Run the migrations. * * @return void */ public function up() { Schema::table(\App\Models\Article::getTableName(), function (Blueprint $table) { $table->foreign('permalink')->references('permalink')->on(\App\Models\ArticlePermalink::getTableName()); }); }
/** * Reverse the migrations. * * @return void */ public function down() { DB::statement(sprintf('DROP TABLE %s CASCADE', \App\Models\ArticlePermalink::getTableName())); }