foreign('beer_id', 'beer_id')->references('beer_id')->on('beer_summary')->onUpdate('RESTRICT')->onDelete('RESTRICT'); $table->foreign('yeast_id', 'yeast_id')->references('id')->on('yeasts')->onUpdate('RESTRICT')->onDelete('RESTRICT'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('beer_fermentation', function (Blueprint $table) { $table->dropForeign('beer_id'); $table->dropForeign('yeast_id'); }); } }