I have this migration file
Schema::create('table_one', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->integer('table_two_id')->unsigned();
$table->foreign('table_two_id')->references('id')->on('table_two');
$table->timestamps();
});
and I want to update to make it ->onDelete('cascade');
$table->foreign('table_two_id')->references('id')->on('table_two')->onDelete('cascade');
What is the best way to do this?
Is there something like ->change();
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…