--- /dev/null
+<?php
+
+namespace Cubist\Util;
+
+class Str extends \Illuminate\Support\Str
+{
+ /**
+ * Generate a URL friendly "slug" from a given string.
+ *
+ * @param string $title
+ * @param string $separator
+ * @param string|null $language
+ * @return string
+ */
+ public static function slugCase($title, $separator = '-', $language = 'en')
+ {
+ $title = $language ? static::ascii($title, $language) : $title;
+
+ // Convert all dashes/underscores into separator
+ $flip = $separator === '-' ? '_' : '-';
+
+ $title = preg_replace('![' . preg_quote($flip) . ']+!u', $separator, $title);
+
+ // Replace @ with the word 'at'
+ $title = str_replace('@', $separator . 'at' . $separator, $title);
+
+ // Remove all characters that are not the separator, letters, numbers, or whitespace.
+ $title = preg_replace('![^' . preg_quote($separator) . '\pL\pN\s]+!u', '', $title);
+
+ // Replace all separator characters and whitespace by a single separator
+ $title = preg_replace('![' . preg_quote($separator) . '\s]+!u', $separator, $title);
+
+ return trim($title, $separator);
+ }
+
+
+}
\ No newline at end of file