increments('id'); $table->integer('program_id')->unsigned(); $table->integer('objective_id')->unsigned(); $table ->foreign('objective_id') ->references('id') ->on('objectives') ->onDelete('cascade') ->onUpdate('cascade'); $table ->foreign('program_id') ->references('id') ->on('programs') ->onDelete('cascade') ->onUpdate('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('objective_program'); } }