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