laravel.su/docs/5.0/database#read-write-connections'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'https://my-site.com/'),
'port' => env('DB_PORT', ''),
'database' => env('DB_DATABASE', 'my_name'),
'username' => env('DB_USERNAME', 'my_name'),
'password' => env('DB_PASSWORD', 'my_pas'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
'mysql2' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'https://my-site2.com/'),
'port' => env('DB_PORT', ''),
'database' => env('DB_DATABASE', 'my_name2'),
'username' => env('DB_USERNAME', 'my_name3'),
'password' => env('DB_PASSWORD', 'my_pas4'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
laravel.su/docs/5.0/database#accessing-connectionsDB::connection('mysql')->table('...')->get(); // Выбор из первого соединения
DB::connection('mysql2')->table('...')->get(); // Выбор из второго соединения