This commit is contained in:
2021-08-03 12:38:30 +08:00
parent 34b4c42873
commit c1c4f6c928
+2 -2
View File
@@ -120,7 +120,7 @@ class Router extends HttpService implements RouterInterface
if ($handler instanceof Closure) {
$handler = Closure::bind($handler, di(Controller::class));
}
return $this->tree($path, $handler, $method);
return $this->hash($path, $handler, $method);
}
@@ -515,7 +515,7 @@ class Router extends HttpService implements RouterInterface
*/
public function dispatch(Request $request): void
{
$node = $this->Branch_search($request);
$node = $this->find_path($request);
if (!($node instanceof Node)) {
$this->response->setFormat(Response::HTML);
$this->response->send('<h1 style="text-align: center;">404</h1>');