File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Mpociot/ApiDoc/Commands Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 77use Illuminate \Console \Command ;
88use Mpociot \Reflection \DocBlock ;
99use Illuminate \Support \Collection ;
10+ use Dingo \Api \Routing \RouteCollection ;
1011use Mpociot \Documentarian \Documentarian ;
1112use Mpociot \ApiDoc \Postman \CollectionWriter ;
1213use Mpociot \ApiDoc \Generators \DingoGenerator ;
@@ -257,7 +258,11 @@ private function getRoutes()
257258 if ($ this ->option ('router ' ) === 'laravel ' ) {
258259 return RouteFacade::getRoutes ();
259260 } else {
260- return app ('Dingo\Api\Routing\Router ' )->getRoutes ();
261+ $ allRouteCollections = app (\Dingo \Api \Routing \Router::class)->getRoutes ();
262+ return collect ($ allRouteCollections )
263+ ->flatMap (function (RouteCollection $ collection ) {
264+ return $ collection ->getRoutes ();
265+ })->toArray ();
261266 }
262267 }
263268
You can’t perform that action at this time.
0 commit comments