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 devsenv.com #
 
PREVIOUS NEXT
Tagged: #Laravel #migrations #custom #foreign #key
ADD COMMENT
Topic
Name
4+4 =