From 3c1914d2adc08c8753c7f67228885ca47fb9b3bf Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 1 Mar 2020 21:29:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Service.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Service.php b/src/Service.php index d813429..22b8532 100644 --- a/src/Service.php +++ b/src/Service.php @@ -10,14 +10,13 @@ // +---------------------------------------------------------------------- namespace think\app; -use think\facade\Event; use think\Service as BaseService; class Service extends BaseService { - public function register() + public function boot() { - Event::listen('HttpRun', function () { + $this->app->event->listen('HttpRun', function () { $this->app->middleware->add(MultiApp::class); });