mongodb - Laravel 5.1 relationship with multiple database -
i using laravel5.1 mongodb in application.
i have 1 default database , separate databases each user.
i want use relationship between user seperate db , default db. try using protected $table = 'default_db_name.table_name';
, try solution laravel forum.
http://laravel.io/forum/02-12-2014-many-to-many-relationship-not-working-across-databases.
the laravel documentation , google dont seem worked me.
any appreciated
try https://github.com/jenssegers/laravel-mongodb
there can connect multiple servers
'mongodb' => array( 'driver' => 'mongodb', 'host' => array('server1', 'server2'), 'port' => 27017, 'username' => 'username', 'password' => 'password', 'database' => 'database', 'options' => array('replicaset' => 'replicasetname')
),
Comments
Post a Comment