📅  最后修改于: 2022-03-11 14:54:33.838000             🧑  作者: Mango
$table->foreignId('user_id')
->constrained("users") <- // You don't need to specify table if it matched laravel naming conventions.
->onUpdate('cascade')
->onDelete('cascade');