Gets the home route

@return string
19593
public static function getHomeRoute()
    {
        if (empty(self::$home_route)) {
            $grav = Grav::instance();

            /** @var Config $config */
            $config = $grav['config'];

            /** @var Language $language */
            $language = $grav['language'];

            $home = $config->get('system.home.alias');

            if ($language->enabled()) {
                $home_aliases = $config->get('system.home.aliases');
                if ($home_aliases) {
                    $active = $language->getActive();
                    $default = $language->getDefault();

                    try {
                        if ($active) {
                            $home = $home_aliases[$active];
                        } else {
                            $home = $home_aliases[$default];
                        }
                    } catch (ErrorException $e) {
                        $home = $home_aliases[$default];
                    }

                }
            }

            self::$home_route = trim($home, '/');
        }

        return self::$home_route;
    }
837270
public function getUrl()
    {
        if ($this->route !== null) {
            return route($this->route[0], $this->route[1]);
        }

        return url($this->url);
    }
1192958
public function isHome(): bool
    {
        return $this->url->current() == $this->url->to($this->config->get('helpers.paths.home'));
    }
1335213
protected function getRouter()
    {
        return isset($this->laravel->router) ? $this->laravel->router : $this->laravel;
    }
1233479
public function getRouteMatch()
    {
        if (null === $this->routeMatch) {
            /** @noinspection PhpUndefinedMethodInspection */
            $this->routeMatch = $this->getEvent()->getRouteMatch();
        }

        return $this->routeMatch;
    }
439536
public function route($var = null)
    {
        if ($var !== null) {
            $this->route = $var;
        }

        if (empty($this->route)) {
            $baseRoute = null;

            // calculate route based on parent slugs
            $parent = $this->parent();
            if (isset($parent)) {
                if ($this->hide_home_route && $parent->route() === $this->home_route) {
                    $baseRoute = '';
                } else {
                    $baseRoute = (string)$parent->route();
                }
            }

            $this->route = isset($baseRoute) ? $baseRoute . '/' . $this->slug() : null;

            if (!empty($this->routes) && isset($this->routes['default'])) {
                $this->routes['aliases'][] = $this->route;
                $this->route = $this->routes['default'];

                return $this->route;
            }
        }

        return $this->route;
    }
866373
public function getRoute() {
        if (is_null($this->route)) {
            $this->route = Yii::$app->request->getHostInfo() . '/' . Yii::$app->request->getPathInfo();
        }
        return $this->route;
    }
273880
protected function getRoute($path)
    {
        if (isset($this->routes[$path])) {
            return $this->routes[$path];
        }

        if ($path == '/') {
            return $this->home_route;
        }

        return $path;
    }
1242997
public function indexUrl()
    {
        $route = 'admin::edit-menu';
        if (Route::has($route)) {
            return route($route, $this->menu_id);
        }

        return route('dashboard');
    }
284007
private static function getHomeDir()
    {
        // On Linux/Unix-like systems, use the HOME environment variable
        if ($homeDir = getenv('HOME')) {
            return $homeDir;
        }

        // Get the HOMEDRIVE and HOMEPATH values for Windows hosts
        if (($homeDrive = getenv('HOMEDRIVE')) && ($homePath = getenv('HOMEPATH'))) {
            return $homeDrive . $homePath;
        }

        throw new BadMethodCallException('Cannot establish the home directory');
    }
23861
public function getURL()
    {
        if (is_string($this->url)) {
            return $this->url;
        }
        return \mpf\WebApp::get()->request()->createURL(isset($this->url[0]) ? $this->url[0] : 'home', isset($this->url[1]) ? $this->url[1] : null, (isset($this->url[2]) && is_array($this->url[2])) ? $this->url[2] : array(), isset($this->url[3]) ? $this->url[3] : ((isset($this->url[2]) && is_string($this->url[2])) ? $this->url[2] : null));
    }
633968
public function redirectPath()
  {
    $desiredUrl = $this->getDesiredUrl();
    if ($desiredUrl !== false) return $desiredUrl;

    if (method_exists($this, 'redirectTo')) {
      return $this->redirectTo();
    }

    return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';
  }
450148
public function redirectToHomepage()
    {
        $homepage = $this->repository->findBy('is_home', 1);
        $locale = $this->getBrowserLanguageOrDefault();

        return redirect($homepage->uri($locale));
    }
1313607
protected function getHomeDir()
    {
        $home = getenv('SURF_HOME');
        if (! $home) {
            if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
                if (! getenv('APPDATA')) {
                    throw new \RuntimeException('The APPDATA or SURF_HOME environment variable must be set for composer to run correctly');
                }
                $home = Files::concatenatePaths([getenv('APPDATA'), 'Surf']);
            } else {
                if (! getenv('HOME')) {
                    throw new \RuntimeException('The HOME or SURF_HOME environment variable must be set for composer to run correctly');
                }
                $home = Files::concatenatePaths([getenv('HOME'), '.surf']);
            }
        }
        $this->ensureDirectoryExists($home);

        return $home;
    }
968842
public function getRoute()
    {
        if (empty($this->route)) {
            $this->route = Base::instance()->get('ALIAS');
        }

        return $this->route;
    }
1008712
public function getHome()
    {
        // Vars
        $config = config('decoy.site.post_login_redirect');
        $auth = app('decoy.user');

        // Make the config optional
        if ($config) {

            // Support the config being a colsure
            if (is_callable($config)) {
                $config = call_user_func($config);
            }

            // Make sure the user has permission before redirecting
            if ($auth->can('read', $config)) {
                return $config;
            }
        }

        // If the user doesn't have permission, iterate through the navigation
        // options until one is permissible
        foreach ($this->getNavUrls() as $url) {
            if ($auth->can('read', $url)) {
                return $url;
            }
        }

        // Default to their account page, which all can access
        return $auth->getUserUrl();
    }
867450
public function getHome()
    {
        $home = null;

        if (!empty(getenv('HOME'))) {
            // Try the environmental variables.
            $home = getenv('HOME');
        } elseif (!empty($_SERVER['HOME'])) {
            // If not in the environment variables, check the superglobal $_SERVER as
            // a last resort.
            $home = $_SERVER['HOME'];
        } elseif (!empty(getenv('HOMEDRIVE')) && !empty(getenv('HOMEPATH'))) {
            // If the 'HOME' environmental variable wasn't found, we may be on
            // Windows.
            $home = getenv('HOMEDRIVE') . getenv('HOMEPATH');
        } elseif (!empty($_SERVER['HOMEDRIVE']) && !empty($_SERVER['HOMEPATH'])) {
            $home = $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'];
        }

        if ($home === null) {
            throw new UnexpectedValueException('Could not locate home directory.');
        }

        return rtrim($home, '\\/');
    }