Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

foreign key in Laravel

// one_line code for foreign in laravel
$table->foreignId('user_id')->constrained()->onDelete('cascade');
 
PREVIOUS NEXT
Tagged: #foreign #key #Laravel
ADD COMMENT
Topic
Name
5+7 =