src/Console/Command/Docs.php
protected function getControllers()
    {
        $controllers = new Collection;

        if ($controller = $this->option('use-controller')) {
            $this->addControllerIfNotExists($controllers, app($controller));

            return $controllers;
        }

        foreach ($this->router->getRoutes() as $collections) {
            foreach ($collections as $route) {
                if ($controller = $route->getControllerInstance()) {
                    $this->addControllerIfNotExists($controllers, $controller);
                }
            }
        }

        return $controllers;
    }
protected function getControllers()
    {
        $controllers = new Collection;

        if ($controller = $this->option('use-controller')) {
            $this->addControllerIfNotExists($controllers, app($controller));

            return $controllers;
        }

        foreach ($this->router->getRoutes() as $collections) {
            foreach ($collections as $route) {
                if ($controller = $route->getControllerInstance()) {
                    $this->addControllerIfNotExists($controllers, $controller);
                }
            }
        }

        return $controllers;
    }
protected function getControllers ( ) { $ controllers = new Collection ; if ( $ controller = $ this -> option ( 'use-controller' ) ) { $ this -> addControllerIfNotExists ( $ controllers , app ( $ controller ) ) ; return $ controllers ; } foreach ( $ this -> router -> getRoutes ( ) as $ collections ) { foreach ( $ collections as $ route ) { if ( $ controller = $ route -> getControllerInstance ( ) ) { $ this -> addControllerIfNotExists ( $ controllers , $ controller ) ; } } } return $ controllers ; }
Get all the controller instances.

@return array
Get all the controller instances .