Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

How to create foreign key in Laravel

$table->foreign('category_id')->references('id')->on('categories')->onUpdate('cascade')->onDelete('cascade');
Source by github.com #
 
PREVIOUS NEXT
Tagged: #How #create #foreign #key #Laravel
ADD COMMENT
Topic
Name
5+6 =