Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel migrations custom foreign key

$table->unsignedBigInteger('created_by');
$table->foreign('created_by')->references('id')->on('users');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Laravel #migrations #custom #foreign #key
ADD COMMENT
Topic
Name
5+1 =