更新时间:2022-01-15 22:23:09
您可以使用Config :: set方法来即时更改基础配置-到另一个数据库连接,假设这就是您的意思。
You can use the Config::set method to change your underlying config on the fly - to another database connection, assuming that is what you mean.
Config::set("database.connections.mysql", [
"host" => "...",
"database" => "...",
"username" => "...",
"password" => "...
]);