Prototype
PHP Slugify or Laravel Sluggable
Do you need to turn text into slugs, or to keep slugs on your Eloquent models?
Facts checked against the source on . Releases, requirements and lines are read live from each package's latest release.
| PHP Slugify | Laravel Sluggable | |
|---|---|---|
| Choose it when | You need slugs from strings anywhere: URLs, file names, keys, any framework. | You want a model column that is filled and kept up to date for you. It installs PHP Slugify for you. |
| What it is | Slug generation from any string: Unicode, transliteration, custom separators and replacement rules. Sourcefor What it is (opens in a new tab) | Slugs stored on Eloquent models, generated when a model is created or updated, using PHP Slugify. Sourcefor What it is (opens in a new tab) |
| How you configure it | Per call, with SlugOptions: separator, lowercase, ASCII only, language, max length, symbol and emoji policies. Sourcefor How you configure it (opens in a new tab) | Per model: a $sluggable property, a sluggable() method, or #[Slug] attributes on the class. Sourcefor How you configure it (opens in a new tab) |
| Laravel features | None. It ships a global slug() helper for plain PHP. Sourcefor Laravel features (opens in a new tab) | Sluggable trait with whereSlug() and findBySlug(), $table->sluggable() migration macro (nullable unique column), @slug Blade directive, config. Sourcefor Laravel features (opens in a new tab) |
| Install | composer require pharaonic/php-slugify | composer require pharaonic/laravel-sluggable |
| Latest release | v8.5.0 | v13.1.0 |
| Released on | 2026-10-06 | 2026-10-27 |
| Requires | PHP 8.5 | PHP 8.3 – 8.5, Laravel 13 |
| Maintained lines | v8.5.x, v8.4.x, v8.3.x, v8.2.x, v8.1.x, v8.0.x | v13.x, v12.x, v11.x, v10.x, v9.x, v8.x, v7.x, v6.x |
| Other dependencies | symfony/polyfill-intl-normalizer, voku/portable-ascii | pharaonic/php-slugify |
| License | MIT | MIT |
Limitations
- Laravel Sluggable fills the slug on save. Slugs for rows that already exist need a save, or a one-off script.
This comparison only covers Pharaonic packages and states what their code does. It doesn't rate them or measure performance. Spotted something out of date? Report it.