Answers for "laravel need a migration foreign key before after user table"

PHP
6

foreign key in laravel migration

$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
Posted by: Guest on June-21-2021

Code answers related to "laravel need a migration foreign key before after user table"

Browse Popular Code Answers by Language