This commit is contained in:
2023-04-19 23:19:18 +08:00
parent 451441e6bd
commit 994e6e7301
+5 -1
View File
@@ -88,7 +88,11 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate
} else if (is_string($closure)) {
$closure = explode('@', $closure);
}
$this->dump[$value][$route] = $closure instanceof Closure ? 'Closure' : $closure;
$this->dump[] = [
'method' => $value,
'path' => $route,
'callback' => $closure instanceof Closure ? 'Closure' : $closure
];
$this->register($route, $value, $handler);
}
} catch (Throwable $throwable) {