Better kebab names

This commit is contained in:
Lance Pioch 2024-06-04 15:38:45 -04:00
parent dbad5ae9c7
commit 551175862e

View File

@ -281,6 +281,12 @@ class Egg extends Model
public function getKebabName(): string public function getKebabName(): string
{ {
return str($this->name)->kebab()->lower()->trim()->split('/[^\w\-]/')->join(''); return str($this->name)
->kebab()
->replace('--', '-')
->lower()
->trim()
->split('/[^\w\-]/')
->join('');
} }
} }