From c2243b780ce31c12948dcef4ab9f1406cf517a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 18 Sep 2021 10:51:58 +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 --- http-helper/Route/Router.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http-helper/Route/Router.php b/http-helper/Route/Router.php index 873b9d55..b4ae65b1 100644 --- a/http-helper/Route/Router.php +++ b/http-helper/Route/Router.php @@ -108,6 +108,9 @@ class Router extends HttpService implements RouterInterface $path = $this->addPrefix() . '/' . ltrim($path, '/'); + if (is_string($handler)) { + $handler = explode('@', $handler); + } HandlerManager::add($path, $method, new Handler($path, $handler));