List all routes in app

@param
@return Response
490472
public function getAllRoutes()
    {
        $routes = Route::getRoutes();
        $results = [];

        if ($routes != null) {
            foreach ($routes as $route) {
                $route = array(
                    'method' => $route->getMethods(),
                    'uri'    => $route->getPath()
                );
                $results[] = (object)$route;
            }
        }

        return response()->json(arrayView('phpsoft.users::route/browse', [
            'routes' => $results,
        ]), 200);
    }
304604
function getRoutes(req, res) {
        var index = {
            name: about.name,
            version: about.version,
            description: about.description,
            routes: app.routes
        };
        return res.json(index);
    }
1242197
public static function getRoutes()
    {
        if (empty(self::$routes)) {
            // If no routes have been set, try the standard file.
            if (is_readable(self::ROUTES_FILE_LOCATION)) {
                // Decode the JSON routes file into an array.
                self::$routes = json_decode(
                    file_get_contents(self::ROUTES_FILE_LOCATION),
                    true
                );
            }
            // No valid routes have been found.
            if (empty(self::$routes)) {
                throw new Exception('No routes could be obtained. Please check the route configuration file.');
            }
        }

        return self::$routes;
    }
1190986
public function refreshActionLookups()
    {
        $this->actionList = [];

        foreach ($this->allRoutes as $route) {
            if (isset($route->getAction()['controller'])) {
                $this->addToActionList($route->getAction(), $route);
            }
        }
    }
991966
public static function getRoutes($context = null)
    {
        if($context == null)
            $context = getenv('ERDIKO_CONTEXT');
        $file = ERDIKO_APP."/config/{$context}/routes.json";
        $applicationConfig = static::getConfigFile($file);
        
        return $applicationConfig['routes'];
    }
181967
public function all()
    {
        $data = [];

        $page      = 1;
        $fetch_all = true;

        $resourceName = constant($this->type . '::RESOURCE');
        $url          = sprintf("%s/%s", self::ENDPOINT, $resourceName);
        if (isset($this->params['page'])) {
            $page      = $this->params['page'];
            $fetch_all = false;
        }

        while (true) {
            $response = $this->fetch($this->buildUrl($url, $this->params), $resourceName);

            if (count($response) > 0) {
                foreach ($response as $item) {
                    $data[] = new $this->type($item);
                }

                if (!$fetch_all) {
                    break;
                } else {
                    $page++;
                    $this->where(['page' => $page]);
                }
            } else {
                break;
            }
        }

        return $data;
    }
1132126
public function routes()
    {
        $routes = $this->app->make('routes.collection')->getAll();

        $headers = ['Condition', 'Filter', 'Action', 'Parameters', 'Pattern', 'Guid'];

        $dataset = array_map(function ($route) {
            return [
                $route->getCondition(),
                $route->getFilter(),
                $route->getAction(),
                $route->getParameters(),
                $route->getPattern(),
                $route->getGuid(),
            ];
        }, $routes);

        $this->table($headers, $dataset);
    }
1138582
public function getListRoute()
    {
        if (null === $this->listRoute) {
            $route = rtrim($this->getBaseRoute(), '/') . '/' . $this->getListSuffix();
            $this->setListRoute($route);
        }

        return $this->listRoute;
    }
376072
public function listAction()
    {
        $siterootManager = $this->get('phlexible_siteroot.siteroot_manager');

        $siteroots = [];
        foreach ($siterootManager->findAll() as $siteroot) {
            $siteroots[] = [
                'id' => $siteroot->getId(),
                'title' => $siteroot->getTitle(),
            ];
        }

        return new JsonResponse([
            'siteroots' => $siteroots,
            'count' => count($siteroots),
        ]);
    }
1336354
public function routes($method = null)
    {
        if ($method && isset($this->methods[$method])) {
            return $this->routes[$method];
        }
        return $this->routes;
    }
694225
protected function routes()
    {
        if ($this->app->routesAreCached()) {
            return;
        }

        Route::middleware(['nova', 'api', Authorize::class])
            ->prefix('nova-vendor/spatie/nova-tags-field')
            ->group(__DIR__.'/../routes/api.php');
    }
674655
public function listAction()
    {
        $this->checkAuth($this->resources, $this->modules, AccessManager::VIEW);
        $request = $this->getRequest();

        if ($request->query->has('id')) {
            $request->query->remove('id');
        }

        $params = array_merge(
            $this->defaultLoopArgs,
            $request->query->all()
        );

        try {
            $results = $this->getLoopResults($params);
        } catch (\Exception $e) {
            throw new HttpException(500, json_encode(["error" => $e->getMessage()]));
        }

        return JsonResponse::create($results);
    }
170776
protected function mapRoutes()
    {
        if (!$this->app->routesAreCached()) {
            Route::group(
                ['middleware' => ['web']], function () {
                    $routes = new Routes();

                    // Backend Routes
                    $routes->mapBackendRoutes()
                        ->mapPluginsBackendRoutes();

                    // Frontend Routes
                    $routes->mapFrontendBaseRoutes()
                        ->mapFrontendRoutes()
                        ->mapThemeRoutes()
                        ->mapPluginsFrontendRoutes();

                    // Add Language {lang} prefix
                    $routes->addLanguagePrefix()
                        ->sortRoutes();
                }
            );
        }
    }
1049065
public function getRoutes() : array {
        $request = get_request();
        $requestMethod = $request->method();
        $requestPathParts = $request->pathParts();
        $routesIndex = $this->routesIndex;
        $routes = [];
        $this->getRoutesFromIndex($routes,$routesIndex, $requestMethod, $requestPathParts);
        return $routes;
    }
860969
protected function getRoutes()
    {
        $results = array();

        foreach($this->routes as $route) {
            $results[] = $this->getRouteInformation($route);
        }

        return array_filter($results);
    }
566489
public function map() {
		$modules = Module::all();
		
		//dd($modules);
		
		foreach ($modules as $module) {
			$routes = $module->routes;
			$routesFolder = 'routes'.DIRECTORY_SEPARATOR;
			
			if ($routes) {
				foreach ($routes as $route) {
					if (strrpos($route, $routesFolder."web")) {
						
						$this->mapWebRoute($route, $module->namespace);
					}
					elseif (strrpos($route, $routesFolder."api")) {
						
						$this->mapApiRoute($route, $module->namespace);
					}
				}
			}
		}
	}
285786
private function getRoutesFromIndex (&$routes, &$routesIndex, &$requestMethod, &$requestPathParts, $requestPathIndex = 0) {
        if (!empty($requestPathParts[$requestPathIndex])) {
            $requestPathPart = $requestPathParts[$requestPathIndex];
            if (array_key_exists($requestPathPart, $routesIndex)) {
                $this->getRoutesFromIndex($routes,$routesIndex[$requestPathPart], $requestMethod, $requestPathParts, $requestPathIndex + 1);
            }
            if (array_key_exists(self::ROUTE_PARAMETER_WILDCARD, $routesIndex)) {
                $this->getRoutesFromIndex($routes,$routesIndex[self::ROUTE_PARAMETER_WILDCARD], $requestMethod, $requestPathParts, $requestPathIndex + 1);
            }
        }
        else if (array_key_exists(self::ROUTE_ACTIONS_KEY, $routesIndex)) {
            $testRoutes = &$routesIndex[self::ROUTE_ACTIONS_KEY];
            if (array_key_exists($requestMethod, $testRoutes)) {
                $this->getRoutesFromIndexActions($routes,$testRoutes[$requestMethod], $requestMethod,$requestPathParts);
            }
            if (array_key_exists(self::ROUTE_GENERIC_METHOD, $testRoutes)) {
                $this->getRoutesFromIndexActions($routes,$testRoutes[self::ROUTE_GENERIC_METHOD], $requestMethod, $requestPathParts);
            }
        }

        if (array_key_exists(self::ROUTE_GENERIC_ACTIONS_KEY, $routesIndex)) {
            $testRoutes = &$routesIndex[self::ROUTE_GENERIC_ACTIONS_KEY];
            if (array_key_exists($requestMethod, $testRoutes)) {
                $this->getRoutesFromIndexActions($routes,$testRoutes[$requestMethod], $requestMethod, $requestPathParts);
            }
            if (array_key_exists(self::ROUTE_GENERIC_METHOD, $testRoutes)) {
                $this->getRoutesFromIndexActions($routes,$testRoutes[self::ROUTE_GENERIC_METHOD], $requestMethod, $requestPathParts);
            }
        }
    }