laravel migration (Foreign Keys)

Submitted by Mahmoud_Zalt - 3 years ago

This is how to add a Foreign Keys in the Migration.

$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users');
comments powered by Disqus