Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel how can I use the same foreign key twice in a single table

$table->unsignedBigInteger('from_inventory_id');
$table->foreign('from_inventory_id')->references('id')->on('inventories');
$table->unsignedBigInteger('to_inventory_id');
$table->foreign('to_inventory_id')->references('id')->on('inventories');
Shar
 
PREVIOUS NEXT
Tagged: #laravel #I #foreign #key #single #table
ADD COMMENT
Topic
Name
5+4 =