laravel migration (Foreign Keys)

Submitted by Mahmoud_Zalt - 9 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');