Define the routes for the application.

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

            /*
             * Admin routes
             */
            $router->middleware('admin')->prefix('admin')->group(function (Router $router) {
                $router->get('pages', 'AdminController@index')->name('admin::index-pages')->middleware('can:see-all-pages');
                $router->get('pages/create', 'AdminController@create')->name('admin::create-page')->middleware('can:create-page');
                $router->get('pages/{page}/edit', 'AdminController@edit')->name('admin::edit-page')->middleware('can:update-page');
                $router->post('pages', 'AdminController@store')->name('admin::store-page')->middleware('can:create-page');
                $router->put('pages/{page}', 'AdminController@update')->name('admin::update-page')->middleware('can:update-page');

                $router->get('pages/{page}/sections/create', 'SectionsAdminController@create')->name('admin::create-page_section')->middleware('can:create-page_section');
                $router->get('pages/{page}/sections/{section}/edit', 'SectionsAdminController@edit')->name('admin::edit-page_section')->middleware('can:update-page_section');
                $router->post('pages/{page}/sections', 'SectionsAdminController@store')->name('admin::store-page_section')->middleware('can:create-page_section');
                $router->put('pages/{page}/sections/{section}', 'SectionsAdminController@update')->name('admin::update-page_section')->middleware('can:update-page_section');
                $router->post('pages/{page}/sections/sort', 'SectionsAdminController@sort')->name('admin::sort-page_sections');

                $router->get('sections', 'SectionsAdminController@index')->name('admin::index-page_sections')->middleware('can:see-all-page_sections');
                $router->delete('sections/{section}', 'SectionsAdminController@destroyMultiple')->name('admin::destroy-page_section')->middleware('can:delete-page_section');
            });

            /*
             * API routes
             */
            $router->middleware('api')->prefix('api')->group(function (Router $router) {
                $router->middleware('auth:api')->group(function (Router $router) {
                    $router->get('pages', 'ApiController@index')->middleware('can:see-all-pages');
                    $router->patch('pages/{page}', 'ApiController@updatePartial')->middleware('can:update-page');
                    $router->post('pages/sort', 'ApiController@sort')->middleware('can:update-page');
                    $router->delete('pages/{page}', 'ApiController@destroy')->middleware('can:delete-page');

                    $router->get('pages/{page}/files', 'ApiController@files')->middleware('can:update-page');
                    $router->post('pages/{page}/files', 'ApiController@attachFiles')->middleware('can:update-page');
                    $router->delete('pages/{page}/files/{file}', 'ApiController@detachFile')->middleware('can:update-page');

                    $router->get('pages/{page}/sections', 'SectionsApiController@index')->middleware('can:see-all-page_sections');
                    $router->patch('pages/{page}/sections/{section}', 'SectionsApiController@updatePartial')->middleware('can:update-page_section');
                    $router->delete('pages/{page}/sections/{section}', 'SectionsApiController@destroy')->middleware('can:delete-page_section');

                    $router->get('page_sections/{section}/files', 'SectionsApiController@files')->middleware('can:update-page_section');
                    $router->post('page_sections/{section}/files', 'SectionsApiController@attachFiles')->middleware('can:update-page_section');
                    $router->delete('page_sections/{section}/files/{file}', 'SectionsApiController@detachFile')->middleware('can:update-page_section');
                });
            });

            /*
             * Front office routes
             */
            $router->middleware('public')->group(function (Router $router) {
                if (config('typicms.main_locale_in_url')) {
                    if (config('typicms.lang_chooser')) {
                        $router->get('/', 'PublicController@langChooser');
                    } else {
                        $router->get('/', 'PublicController@redirectToHomepage');
                    }
                }
                foreach (locales() as $locale) {
                    if (
                        config('app.fallback_locale') != $locale ||
                        config('typicms.main_locale_in_url')
                    ) {
                        $router->prefix($locale)->get('{uri}', 'PublicController@uri')->where('uri', '(.*)');
                    }
                }
                $router->get('{uri}', 'PublicController@uri')->where('uri', '(.*)');
            });
        });
    }
1134927
public function readRoutes()
    {
        // routes begin with method
        $this->__method = $this->detectMethod();

        // find all matching routes
        $try_routes = array();
        foreach($this->__routes as $route) {
            // correct request type
            if(substr($route,0,strlen($this->__method)) == $this->__method) {
                $params = $this->routeParams($route);    
                if ($params !== false && $this->hasParams($params)) {
                    if (!isset($try_routes[count($params)])) {
                        $try_routes[count($params)] = array();
                    }
                    $try_routes[count($params)][] = $route;
                } elseif ($params === false) {
                    $try_routes[0] = array($route);
                }
            }
        }
        
        // use the route with the most parameters
        // set class variables to parameters
        $num_params = array_keys($try_routes);
        rsort($num_params);
        $this->__route_stem = 'unknownRequest';
        if (count($num_params) > 0) {
            $longest = $num_params[0];
            $best_route = array_pop($try_routes[$longest]);
            $this->__route_stem = $this->__method;
            if ($longest > 0) {
                foreach($this->routeParams($best_route) as $param) {
                    $this->$param = $this->form->$param;
                    $this->__route_stem .= '_'.$param;
                }
            }
        }
    }
1336354
public function routes($method = null)
    {
        if ($method && isset($this->methods[$method])) {
            return $this->routes[$method];
        }
        return $this->routes;
    }
1323811
protected function paths()
    {
        $paths = array('APPPATH' => $this->constants['APPPATH']);

        $paths['VENDOR'] = $this->constants['VENDOR'];

        $paths['VIEWPATH'] = $this->constants['VIEWPATH'];

        foreach ((array) $paths as $key => $value) {
            $defined = defined($key);

            $defined || define($key, $value);
        }

        defined('BASEPATH') || $this->basepath();
    }
1184387
public static function ApiRoutes(){
        Route::group(['prefix' => 'geo'], function(){
            Route::get('search/{name}/{parent_id?}',    '\Igaster\LaravelCities\GeoController@search');
            Route::get('item/{id}',         '\Igaster\LaravelCities\GeoController@item');
            Route::get('items/{ids}',       '\Igaster\LaravelCities\GeoController@items');
            Route::get('children/{id}',     '\Igaster\LaravelCities\GeoController@children');
            Route::get('parent/{id}',       '\Igaster\LaravelCities\GeoController@parent');
            Route::get('country/{code}',    '\Igaster\LaravelCities\GeoController@country');
            Route::get('countries',         '\Igaster\LaravelCities\GeoController@countries');
        });
    }
306608
public function resolve()
    {
        $rawParams = $this->getParams();
        if (isset($rawParams[0])) {
            $route = $rawParams[0];
            array_shift($rawParams);
        } else {
            $route = '';
        }

        $params = [];
        foreach ($rawParams as $param) {
            if (preg_match('/^--(\w+)(=(.*))?$/', $param, $matches)) {
                $name = $matches[1];
                if ($name !== Application::OPTION_APPCONFIG) {
                    $params[$name] = isset($matches[3]) ? $matches[3] : true;
                }
            } else {
                $params[] = $param;
            }
        }

        return [$route, $params];
    }
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();
    }
862021
protected function getRouteDefinitions()
    {
        $provider = 'Adamgoose\AnnotationsServiceProvider';

        return '<?php '.PHP_EOL.PHP_EOL.Scanner::create(
          $this->laravel->getProvider($provider)->routeScans()
        )->getRouteDefinitions().PHP_EOL;
    }
767012
protected function mapWebRoutes()
    {
        Route::group([
            'middleware' => config($this->package.'.web_routes_middleware') ?: 'web',
            'namespace'  => $this->namespace,
            'prefix' => $this->prefix,
        ], function ($router) {
            require __DIR__.'/../Routes/web.php';
        });
    }
408117
public function currentRouteAction()
	{
		if ( ! $this->current()) return;

		$action = $this->current()->getAction();

		return isset($action['controller']) ? $action['controller'] : null;
	}
764851
public function getRouteDefinitionsDetail()
    {
        $paths = array();
        foreach ($this->getEndpointsInClasses($this->getReader()) as $endpoint) {
            /* @var \Collective\Annotations\Routing\Annotations\MethodEndpoint $endpoint */
            foreach ($endpoint->toRouteDefinitionDetail() as $path) {
                $paths[] = $path;
            }
        }

        return $paths;
    }
74526
public function setupRoutes()
    {
        if ($this->routeManager === null) {
            parent::setupRoutes();

            // Serve the Admin's "Not Found" handler for the Admin's route group.
            $this->app()->any('{catchall:.*}', 'notFoundHandler');
        }

        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;
    }
1121056
public static function routes()
  {
    Route::group(['namespace' => 'Auth'], function () {

      Route::group(['middleware' => ['guest']], function () {

        Route::get('login', 'LoginController@showLoginPage')->name('showLogin');
        Route::post('login', 'LoginController@login')->name('login');

        Route::get('login/email', 'LoginController@showMagicLinkPage')->name('showMagicLink');
        Route::post('login/email', 'LoginController@loginWithEmail')->name('loginWithEmail');
        Route::get('login/callback/email/', 'LoginController@loginEmailCallback')->name('loginCallback');

        Route::get('register', 'RegisterController@showRegistrationPage')->name('showRegistration');
        Route::post('register', 'RegisterController@register')->name('register');

        Route::get('password/forgot', 'ForgotPasswordController@showForgotPasswordPage')->name('showForgotPassword');
        Route::post('password/forgot', 'ForgotPasswordController@forgot')->name('forgot');

        Route::get('password/reset', 'ForgotPasswordController@showResetPasswordPage')->name('showResetPassword');
        Route::post('password/reset', 'ForgotPasswordController@resetPassword')->name('resetPassword');

      });

      Route::get('logout', 'LoginController@logout')->name('logout')->middleware('private', 'auth');
      Route::get('account/verify', 'RegisterController@verifyEmail')->name('verify');

    });
  }
802931
public function setRoutes() : void
    {
        if (is_null($this->routes)) {
            $this->routes = [];
            $routesConfig = $this->config->getParam('routes') ?? [];
            foreach ($routesConfig as $routeName => $routeArr) {
                $route = new Route(
                    $routeName,
                    $routeArr['methods'],
                    $routeArr['path'],
                    $routeArr['params_defaults'],
                    $routeArr['params_requirements'],
                    $routeArr['handler'],
                    $routeArr['handler_method'] ?? null
                );
                $this->routes[] = $route;
            }
        }
    }
1285100
public function prepare()
    {
        if ($this->ready) {
            return null;
        }

        $this->ready = true;

        $format     = $this->format;
        $controller = $this->controller;

        foreach ($this->classMethods as $value) {
            if ($format === self::BOTH || $format === self::SLASH) {
                $route = '/' . (empty($value[1]) ? '' : ($value[1] . '/'));

                Route::set($value[0], $route, $controller . ':' . $value[2]);
            }

            if ($format === self::BOTH || $format === self::NOSLASH) {
                $route = empty($value[1]) ? '' : ('/' . $value[1]);

                Route::set($value[0], $route, $controller . ':' . $value[2]);
            }
        }

        $controller = $classMethods = null;
    }
1119407
private function mapAdminRoutes()
    {
        $this->name('blog.')
             ->prefix($this->config()->get('arcanesoft.blog.route.prefix', 'blog'))
             ->group(function () {
                 Routes\Admin\StatsRoutes::register();
                 Routes\Admin\PostsRoutes::register();
                 Routes\Admin\CommentsRoutes::register();
                 Routes\Admin\CategoriesRoutes::register();
                 Routes\Admin\TagsRoutes::register();
            });
    }