protected function slug($string, $isDomain = false)
    {
        $pattern = ($isDomain ? '/[^A-Za-z0-9-\.]+/' : '/[^A-Za-z0-9-]+/');

        return strtolower(trim(preg_replace($pattern, '-', $string)));
    }