update:修复多数据库切换之后CatchQuery方法失效

This commit is contained in:
JaguarJack 2021-02-05 13:52:23 +08:00
parent 068234b57c
commit 0efe79ddb3

View File

@ -103,7 +103,10 @@ class CatchAdminService extends Service
{
$connections = $this->app->config->get('database.connections');
$connections['mysql']['query'] = CatchQuery::class;
// 支持多数据库配置注入 Query
foreach ($connections as &$connection) {
$connection['query'] = CatchQuery::class;
}
$this->app->config->set([
'connections' => $connections