From 441ce5fd450678bdb08274ba0ef612b2d4fd769b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 25 Aug 2021 11:26:57 +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/Node.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-helper/Route/Node.php b/http-helper/Route/Node.php index 9d6d7d19..82f2d124 100644 --- a/http-helper/Route/Node.php +++ b/http-helper/Route/Node.php @@ -97,7 +97,7 @@ class Node */ public function setHandler($handler, $path): static { - $this->sourcePath = $path; + $this->sourcePath = '/' . ltrim($path, '/'); if (is_string($handler) && str_contains($handler, '@')) { $handler = $this->splitHandler($handler); } else if ($handler != null && !is_callable($handler, true)) {