public function toSlugCase($replacement = '-', $language = 'en', $strToLower = true)
    {
        if (!class_exists('\\voku\\helper\\URLify'))
        {
            throw new \RuntimeException
            (
                "This method requires \voku\helper\URLify. ".
                "Install with: composer require voku/urlify"
            );
        }

        return $this->newSelf
        (
            \voku\helper\URLify::slug
            (
                $this->scalarString,
                $language,
                $replacement,
                $strToLower
            )
        );
    }
public function toSlugCase($replacement = '-', $language = 'en', $strToLower = true)
    {
        if (!class_exists('\\voku\\helper\\URLify'))
        {
            throw new \RuntimeException
            (
                "This method requires \voku\helper\URLify. ".
                "Install with: composer require voku/urlify"
            );
        }

        return $this->newSelf
        (
            \voku\helper\URLify::slug
            (
                $this->scalarString,
                $language,
                $replacement,
                $strToLower
            )
        );
    }
public function toSlugCase ( $ replacement = '-' , $ language = 'en' , $ strToLower = true ) { if ( ! class_exists ( '\\voku\\helper\\URLify' ) ) { throw new \ RuntimeException ( "This method requires \voku\helper\URLify. " . "Install with: composer require voku/urlify" ) ; } return $ this -> newSelf ( \ voku \ helper \ URLify :: slug ( $ this -> scalarString , $ language , $ replacement , $ strToLower ) ) ; }
Converts the string into an URL slug.

This includes replacing non-ASCII characters with their closest ASCII
equivalents, removing remaining non-ASCII and non-alphanumeric
characters, and replacing whitespace with $replacement.

The replacement defaults to a single dash
and the string is also converted to lowercase.

@param string $replacement The string used to replace whitespace
@param string $language    The language for the url
@param bool   $strToLower  string to lower

@return static
Converts the string into an URL slug .