public static function snake($str, $delimiter = '_')
    {
        $str = preg_replace('/([A-Z ])/', ' $1', $str);
        $str = preg_replace('/\s+/', $delimiter, trim($str));
        $str = strtolower($str);

        return $str;
    }