This commit is contained in:
xl
2024-08-29 15:58:42 +08:00
parent 2058849059
commit dfeb79aaea
+3
View File
@@ -185,6 +185,9 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate
private function resolve(string|array $closure, ControllerInterpreter $interpreter): Handler
{
if (is_array($closure)) {
if (is_string($closure[0])) {
$closure[0] = $this->container->get($closure[0]);
}
return $interpreter->addRouteByString(... $closure);
}
if (!str_contains($closure, '@')) {