I have user_id fk column in my table
$table->foreign(\'user_id\')->references(\'id\')->on(\'users\');
I should add on cascade
In my case, i'll need to put the col name in an array else that will be an error.
Schema::table('transactions', function (Blueprint $table) {
$table->dropForeign(['transactions_order_id_foreign']);
$table->foreign('order_id')
->references('id')->on('orders')
->onDelete('cascade')
->change();
});
mysql 5.7 ver