Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel migration add contraint to other database

$table->foreign('user_id')->references('id')->on('main_db.users');
//                                                ^^^^^^^
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #migration #add #contraint #database
ADD COMMENT
Topic
Name
3+8 =