Laravel Menambahkan kendala kunci asing

$table->foreignId('user_id')
      ->constrained("users") <- // You don't need to specify table if it matched laravel naming conventions.
      ->onUpdate('cascade')
      ->onDelete('cascade');
kelraf