public function generateRouteFromText($text, $withSlash = false)
    {
        if ($withSlash) {
            $result = '';
            foreach (explode('/', $text) as $value) {
                if ('' !== $value = trim($value)) {
                    $result .= '/' . Urlizer::urlize($value);
                }
            }

            return $result ?: '/';
        }

        return $this->normalizeRoute(Urlizer::urlize($text));
    }