public static function idize($string, $capitalize = false)
    {
        $string = mb_strtolower(static::stripDiacritics($string));

        $string = preg_replace('/[^0-9a-zA-Z-]/i', '-', $string);
        $string = preg_replace('/(-+)/i', '-', $string);
        $string = trim($string, '-');

        return $capitalize ? mb_strtoupper($string) : $string;
    }