From 215d2c677278311316db77a3641c26bdce11576c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 19 Jan 2021 18:02:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/DatabasesProviders.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Database/DatabasesProviders.php b/Database/DatabasesProviders.php index a6f496c2..eaee430f 100644 --- a/Database/DatabasesProviders.php +++ b/Database/DatabasesProviders.php @@ -33,11 +33,11 @@ class DatabasesProviders extends Providers $event->on(Event::SERVER_WORKER_START, [$this, 'createPool']); $event->on(Event::SERVER_TASK_START, [$this, 'createPool']); -// $event = Snowflake::app()->getEvent(); -// $event->on(Event::SERVER_WORKER_START, function () { -// $attributes = Snowflake::app()->getAttributes(); -// $attributes->readControllers(CONTROLLER_PATH, 'App\Models', 'models'); -// }); + $event = Snowflake::app()->getEvent(); + $event->on(Event::SERVER_WORKER_START, function () { + $attributes = Snowflake::app()->getAttributes(); + $attributes->readControllers(CONTROLLER_PATH, 'App\Models', 'models'); + }); }