Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

make a forign key in migrations using laravel 8

$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
 
PREVIOUS NEXT
Tagged: #forign #key #migrations #laravel
ADD COMMENT
Topic
Name
7+6 =