Connect multiple databases dynamically in laravel
问题 I'm building an application which requires connecting 2 database. first one is static and another one is dynamic. config/database.php is like 'mysql' => array ( 'driver' => 'mysql', 'host' => '127.0.0.1', 'port' => '3306', 'database' => 'blog', 'username' => 'root', 'password' => '', 'unix_socket' => '', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => NULL, ), 'business2' => array ( 'driver' => 'mysql', 'host' => '127.0.0.1', 'port' =