List the known routes

This command displays a list of all currently registered routes.

@return void
425109
public function listCommand()
    {
        $this->outputLine('Currently registered routes:');
        /** @var Route $route */
        foreach ($this->router->getRoutes() as $index => $route) {
            $uriPattern = $route->getUriPattern();
            $this->outputLine(str_pad(($index + 1) . '. ' . $uriPattern, 80) . $route->getName());
        }
    }
927768
public function registerSubRoutes()
    {
        if (!is_array($this->subAdmin)) {
            return;
        }

        foreach ($this->subAdmin as $adminItem) {
            $this->registerRoute($adminItem->getController(), $adminItem->routeParameters());
        }
    }
634657
protected function addAppRoutes()
    {
        $routes = $this->getConfig('routes');
        if (is_array($routes)) {
            $this->getRouter()->addRoutes($routes);
        }
    }
998082
public function collectRoutes()
    {
        $routes = [];

        foreach($this->getCollectors() as $collector) {
            $routes = array_merge($routes, $collector->collectRoutes());
        }

        return $routes;
    }
84594
public function refreshNameLookups()
    {
        $this->nameList = [];

        foreach ($this->allRoutes as $route) {
            if ($route->getName()) {
                $this->nameList[$route->getName()] = $route;
            }
        }
    }
1151599
public function listPaths() {
		$request = new CPS_ListPathsRequest();
		$this->_lastResponse = $this->_connection->sendRequest($request);
		return $this->_lastResponse->getPaths();
	}
404763
protected function displayRoutes(array $routes)
    {
        $this->table->setHeaders($this->headers)->setRows($routes);

        $this->table->render($this->getOutput());
    }
510567
protected static function registerRoutes()
    {
        parent::routes(function ($router) {
            /* @var \Illuminate\Routing\Router $router */
            $router->get('backup', 'Encore\Admin\Backup\BackupController@index')->name('backup-list');
            $router->get('backup/download', 'Encore\Admin\Backup\BackupController@download')->name('backup-download');
            $router->post('backup/run', 'Encore\Admin\Backup\BackupController@run')->name('backup-run');
            $router->delete('backup/delete', 'Encore\Admin\Backup\BackupController@delete')->name('backup-delete');
        });
    }
415953
private function deleteAllRoutes()
    {
        $routes = $this->getDbRoutes();
        foreach ($routes as $route) {
            Craft::$app->routes->deleteRouteById($route['id']);
        }
    }
1372185
protected function buildNameIndex() : void
    {
        foreach ($this->routes as $key => $route) {
            if (! is_null($route->getName())) {
                unset($this->routes[$key]);
                $this->namedRoutes[$route->getName()] = $route;
            }
        }
    }
336445
public function registerRoute()
    {
        if(!is_null($services = $this->services)) {
            foreach($services as $service) {

                $routes = $this->app->make($service)->registerRoute();

                $this->requiredRoute($routes);
            }
        }
    }
351255
public function listAddress()
    {
        $this->actionListAddress();
        $this->setTitleListAddress();
        $this->setBreadcrumbListAddress();
        $this->setFilterListAddress();
        $this->setPagerlListAddress();

        $this->setData('addresses', $this->getListAddress());
        $this->outputListAddress();
    }
1190986
public function refreshActionLookups()
    {
        $this->actionList = [];

        foreach ($this->allRoutes as $route) {
            if (isset($route->getAction()['controller'])) {
                $this->addToActionList($route->getAction(), $route);
            }
        }
    }
195261
public function actionIndex()
    {
        $model = Yii::createObject($this->modelClass);

        return $this->render('index', ['routes' => $model->getAvailableAndAssignedRoutes()]);
    }
681723
public function routes($routes) {
        foreach($routes as $route => $controllerAction) {
            // if we're dealing with a namespace
            if(is_array($controllerAction)) {

            } else {
                $explodedRoute = explode(' ', $route);
                list($method, $path) = $explodedRoute;

                // If it's a resource it'll register it's own routes
                if($method == 'RESOURCE') {
                    // Resource route registers don't have actions
                    $controller = $controllerAction;

                    // Handle resource controllers
                    require_once app_path("controllers/$controller.php");
                    $routes = $controller::_registerRoutes($this, $path, $controller);
                } else {
                    $explodedAction = explode('@', $controllerAction);
                    list($controller, $action) = $explodedAction;

                    $this->register($method, $path, $controller, $action);
                }
            }
        }
    }
183592
protected static function registerRoutes()
    {
        parent::routes(function ($router) {
            /* @var \Illuminate\Routing\Router $router */
            $router->get('logs', 'Encore\Admin\LogViewer\LogController@index')->name('log-viewer-index');
            $router->get('logs/{file}', 'Encore\Admin\LogViewer\LogController@index')->name('log-viewer-file');
            $router->get('logs/{file}/tail', 'Encore\Admin\LogViewer\LogController@tail')->name('log-viewer-tail');
        });
    }
763927
private function gatherRoutesDefinitions()
    {
        $route = $this->findRouteByName($this->homeRouteName);
        $this->homeDefinition = new RouteDefinition($this->homeRouteName, $this->resolveRouteOptions($route, $this->homeRouteName));

        /** @var Route $route */
        foreach ($this->routes as $name => $route) {
            if ($this->homeRouteName !== $name && null !== $cms = $route->getOption('_cms')) {
                if (array_key_exists('name', $cms)) {
                    $this->createRouteDefinition($name, $route);
                }
            }
        }

        $this->homeDefinition->sortChildren();
    }