Skip to content

Commit a427dd3

Browse files
committed
fix: adding controller multiple times
1 parent 04aaf7b commit a427dd3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Console/Command/Docs.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ protected function getControllers()
9696
foreach ($this->router->getRoutes() as $collections) {
9797
foreach ($collections as $route) {
9898
if ($controller = $route->getController()) {
99-
$controllers[] = $controller;
99+
if(!$controllers->contains($controller)) {
100+
$controllers->push($controller);
101+
}
100102
}
101103
}
102104
}

0 commit comments

Comments
 (0)