slug() public static method
Returns a string with all spaces converted to given replacement, non word characters removed and the rest of characters transliterated. If intl extension isn't available uses fallback that converts latin characters only and removes the rest. You may customize characters map via $transliteration property of the helper.
public static string slug ( $string, $replacement = '-', $lowercase = true )$string string
An arbitrary string to convert $replacement string