You can use as many databases as you want in a single migration. In your database config file you can specify any number of connections you want. If you are using MySQL, the default config is at the key "mysql" but you can make "mysql2" or "foobar" or whatever you want. Then in your migration you can tell the Schema facade what connection to use.
Schema::connection('mysql2')->create('some_table', function($table)
{
$table->increments('id'):
});
More information here: http://fideloper.com/laravel-multiple-database-connections
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community