eee
This commit is contained in:
@@ -185,6 +185,9 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate
|
|||||||
private function resolve(string|array $closure, ControllerInterpreter $interpreter): Handler
|
private function resolve(string|array $closure, ControllerInterpreter $interpreter): Handler
|
||||||
{
|
{
|
||||||
if (is_array($closure)) {
|
if (is_array($closure)) {
|
||||||
|
if (is_string($closure[0])) {
|
||||||
|
$closure[0] = $this->container->get($closure[0]);
|
||||||
|
}
|
||||||
return $interpreter->addRouteByString(... $closure);
|
return $interpreter->addRouteByString(... $closure);
|
||||||
}
|
}
|
||||||
if (!str_contains($closure, '@')) {
|
if (!str_contains($closure, '@')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user