From 0efe79ddb338bda0919c1d556c8bd164bb73c7a8 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Fri, 5 Feb 2021 13:52:23 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BF=AE=E5=A4=8D=E5=A4=9A=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E5=88=87=E6=8D=A2=E4=B9=8B=E5=90=8ECatchQuer?= =?UTF-8?q?y=E6=96=B9=E6=B3=95=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/CatchAdminService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extend/catcher/CatchAdminService.php b/extend/catcher/CatchAdminService.php index 6cc5ca9..984ef8d 100644 --- a/extend/catcher/CatchAdminService.php +++ b/extend/catcher/CatchAdminService.php @@ -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