Define the routes for the application.

@return null
355833
public function map()
    {
        Route::namespace($this->namespace)->group(function (Router $router) {

            /*
             * Admin routes
             */
            $router->middleware('admin')->prefix('admin')->group(function (Router $router) {
                $router->get('dashboard', 'AdminController@dashboard')->name('dashboard')->middleware('can:see-dashboard');
                $router->get('', 'AdminController@index')->middleware('can:see-dashboard');
            });
        });
    }
1269187
public function setRoutes()
    {
        $routesJsonFile = $this->getAppDir() . '/config/routes.json';
        $routesPhpFile = $this->getAppDir() . '/config/routes.php';
        $routes = array();

        if (file_exists($routesJsonFile)) {
            $routes[] = json_decode(file_get_contents($routesJsonFile), true);
        } elseif (file_exists($routesPhpFile)) {
            $routes[] = require_once $routesPhpFile;
        }

        foreach ($this->container->getModules() as $module) {
            $extension = $module->getModuleExtension();
            if (is_object($extension) && $extension instanceof Injection\Extension) {
                $routes[] = $extension->loadRoutes();
            }
        }

        return $routes;
    }
137477
protected function routes()
    {
        if ($this->app->routesAreCached()) {
            return;
        }

        Route::middleware(['nova', Authorize::class])
            ->prefix('nova-vendor/nova-spotify-auth-tool')
            ->group(__DIR__.'/../routes/web.php');

        Route::middleware(['nova', Authorize::class])
            ->prefix('nova-vendor/nova-spotify-auth-tool')
            ->group(__DIR__.'/../routes/api.php');
    }
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;
    }
1345679
public function indexAction()
    {
        /* @todo: move this into a listener.
         *
         * The following lines allow to override get param[q] with the
         * param from route. This feature is needed for a landing-page feature, where
         * human readable urls like http://yawik.org/demo/de/jobs/sales.html
         *
         * move the Logic into a Listener, which can be activated, if needed
         */
        $request = $this->getRequest();
        $getParams = $request->getQuery();
        $routeParams = $this->params()->fromRoute();
        if (isset($routeParams['q']) && !isset($getParams['q'])) {
            $getParams['q']=$routeParams['q'];
        }

        $result = $this->pagination([
                'params' => ['Jobs_Board', [
                    'q',
                    'count' => $this->options['count'],
                    'page' => 1,
                    'l',
                    'd' => 10]
                ],
                'form' => ['as' => 'filterForm', 'Jobs/JobboardSearch'],
                'paginator' => ['as' => 'jobs', 'Jobs/Board']
            ]);

        $organizationImageCache = $this->imageFileCacheManager;

        $result['organizationImageCache'] = $organizationImageCache;

        return new ViewModel($result);
    }
967437
public function setupRoutes()
    {
        if (!isset($this->routeManager)) {
            $config = $this->config();
            $routes = (isset($config['routes']) ? $config['routes'] : [] );

            $this->routeManager = new RouteManager([
                'config' => $routes,
                'app'    => $this->app(),
                'logger' => $this->logger
            ]);

            $this->routeManager->setupRoutes();
        }

        return $this;
    }
732397
protected function initRoutes()
    {
        if (isset($this->settings) && $this->settings->exists('routes') || !self::$init_stages[$this->name]['routes']) {

            $routes = $this->settings->get('routes');

            // Get uncamelized app name
            $string = new CamelCase($this->name);
            $app = $string->uncamelize();

            // Add always a missing index route!
            if (!array_key_exists('index', $routes)) {
                $routes['index'] = [];
            }

            foreach ($routes as $name => $definition) {

                if (is_numeric($name)) {
                    Throw new AppException(sprintf('AbstractApp "%s" sent a nameless route to be mapped.', $this->name));
                }

                $definition = $this->parseRouteDefintion($name, $definition);

                $this->core->router->map($definition['method'], $definition['route'], $definition['target'], $definition['name']);
            }

            self::$init_stages[$this->name]['routes'] = true;
        }
    }
1071982
protected function getRoutes()
    {
        if (0 === count($this->routes)) {
            return $this->router->getRouteCollection()->all();
        }

        $routes = [];
        foreach ($this->routes as $name) {
            $route = $this->router->getRouteCollection()->get($name);
            if (null !== $route) {
                $routes[$name] = $route;
            }
        }

        return $routes;
    }
365843
protected function mapWebRoutes(): void
    {
        $file = $this->basePath.'routes/web.php';

        if (file_exists($file)) {
            $this->loadRoutesFrom(
                Route::middleware('web')
                ->group($file));
        }
    }
775791
public function runApplication()
    {
        $routeCollection = $this->createRouteCollection();
        $dispatcher = $routeCollection->getDispatcher();

        $request = $this->createRequest();
        $response = $dispatcher->dispatch($request->getMethod(), $request->getPathInfo());
        $response->send();
    }
83595
private function _route() {
        $this->profiler->addTime('route');

        $router = new Router($this);

        foreach ($this->config->config['route'] as $key => $value) {
            foreach ($value as $data) {
                $vars = explode(',', $data['vars']);
                $controller = explode('.', $data['action'])[0];
                $action = explode('.', $data['action'])[1];

                $router->addRoute(new Route($data['url'], $controller, $action, $data['name'], $data['cache'], $vars, $key, $data['logged'], $data['access'], $data['method']));
            }
        }

        $this->request->data->post = $_POST;
        $this->request->data->get = $_GET;
        $this->request->data->file = $_FILES;
        $this->request->data->method = strtolower($_SERVER['REQUEST_METHOD']);

        if (isset($_GET['request-get']) && $_SERVER['REQUEST_METHOD'] == 'GET') {
            $this->request->data->form = true;
            $this->request->data->method = 'get';
        }
        else if (isset($_POST['request-post'])) {
            $this->request->data->form = true;
            $this->request->data->method = 'post';
        }
        else if (isset($_POST['request-put'])) {
            $this->request->data->form = true;
            $this->request->data->method = 'put';
            $this->request->data->put = $_POST;
        }
        else if (isset($_POST['request-patch'])) {
            $this->request->data->form = true;
            $this->request->data->method = 'patch';
            $this->request->data->patch = $_POST;
        }
        else if (isset($_POST['request-delete'])) {
            $this->request->data->form = true;
            $this->request->data->method = 'delete';
            $this->request->data->delete = $_POST;
        }

        if ($_SERVER['REQUEST_METHOD'] == 'PUT') {
            parse_str(file_get_contents("php://input"), $put_vars);
            $this->request->data->put = $put_vars;
        }
        else if ($_SERVER['REQUEST_METHOD'] == 'PATCH') {
            parse_str(file_get_contents("php://input"), $patch_vars);
            $this->request->data->patch = $patch_vars;
        }
        else if ($_SERVER['REQUEST_METHOD'] == 'DELETE') {
            parse_str(file_get_contents("php://input"), $delete_vars);
            $this->request->data->delete = $delete_vars;
        }

        if ($matchedRoute = $router->getRoute(preg_replace('`\?' . preg_quote($_SERVER['QUERY_STRING']) . '`isU', '', $_SERVER['REQUEST_URI']), $this->config)) {
            $_GET = array_merge($_GET, $matchedRoute->vars());

            $this->request->name = $matchedRoute->name();
            $this->request->src = $matchedRoute->src();
            $this->request->controller = $matchedRoute->controller();
            $this->request->action = $matchedRoute->action();
            $this->request->logged = $matchedRoute->logged();
            $this->request->access = $matchedRoute->access();
            $this->request->method = $matchedRoute->method();
            $this->request->auth = new Auth($this->request->src);

            if ($this->config->config['user']['output']['cache']['enabled'] && $matchedRoute->cache() != '') {
                $this->request->cache = $matchedRoute->cache();
            }
            else {
                $this->request->cache = 0;
            }

            if ($this->request->action == '') {
                $this->request->action = 'default';
            }

            $this->_route = true;
        }

        $this->profiler->addTime('route', Profiler::USER_END);

        return $this;
    }
448594
public static function route(): AbstractRoute
    {
        if (static::$routing === null) {
            $config = static::getConfig('application');
            $routingClassName = $config->get('routing_class');
            $routeOptions = $config->get('routing_options') ?? [];

            if ($routingClassName == null) {
                static::terminateWithError('Can not init routing class when routing_class is not set in application config');
            }

            static::$routing = new $routingClassName($routeOptions);
        }

        return static::$routing;
    }
862021
protected function getRouteDefinitions()
    {
        $provider = 'Adamgoose\AnnotationsServiceProvider';

        return '<?php '.PHP_EOL.PHP_EOL.Scanner::create(
          $this->laravel->getProvider($provider)->routeScans()
        )->getRouteDefinitions().PHP_EOL;
    }
145947
public function routes()
    {
        if (empty($this->routes))
        {
            $this->routes = $this->configureSlice()->asArray();
        }

        return $this->routes;
    }
358529
public function route()
    {
        $this->dashboardRouting($this->relativeCmsUri);
        $this->logOffRouting($this->request, $this->relativeCmsUri);
        $this->apiRouting($this->relativeCmsUri);
        $this->documentRouting($this->userRights, $this->relativeCmsUri);
        $this->valuelistsRouting($this->userRights, $this->relativeCmsUri);
        $this->sitemapRouting($this->userRights, $this->relativeCmsUri);
        $this->redirectRouting($this->userRights, $this->relativeCmsUri);
        $this->imageRouting($this->userRights, $this->relativeCmsUri);
        $this->filesRouting($this->userRights, $this->relativeCmsUri);
        $this->configurationRouting($this->userRights, $this->relativeCmsUri);
        $this->searchRouting($this->relativeCmsUri);
    }
999090
public function map()
    {
        $themeName = ltrim(
            str_replace(themes_path(), '', realpath(__DIR__.'/../../')),
            '\/'
        );

        Route::middleware('web')
            ->namespace($this->namespace)
            ->group(themes_path($themeName.'/routes.php'));
    }
1345989
protected function loadRoutes()
    {
        $path = $this->extensionPath;

        $routes = [
            'backend'  => [
                $path . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'backend.php',
                $path . DIRECTORY_SEPARATOR . 'backend.php',
                $path . DIRECTORY_SEPARATOR . 'routes.php',
            ],
            'frontend' => [
                $path . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'frontend.php',
                $path . DIRECTORY_SEPARATOR . 'frontend.php',
            ]
        ];
        foreach ($routes as $area => $routePaths) {
            foreach ($routePaths as $route) {
                if (!file_exists($route)) {
                    continue;
                }
                switch ($area) {
                    case 'frontend':
                        $this->loadFrontendRoutesFrom($route);
                        break;
                    case 'backend':
                        $this->loadBackendRoutesFrom($route);
                        break;
                }
            }
        }
    }