Skip to content

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 or Laravel Sluggable: facts side by side
PHP SlugifyLaravel Sluggable
Choose it whenYou 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 isSlug 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 itPer 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 featuresNone. 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)
Installcomposer require pharaonic/php-slugifycomposer require pharaonic/laravel-sluggable
Latest releasev8.5.0v13.1.0
Released on2026-10-062026-10-27
RequiresPHP 8.5PHP 8.3 – 8.5, Laravel 13
Maintained linesv8.5.x, v8.4.x, v8.3.x, v8.2.x, v8.1.x, v8.0.xv13.x, v12.x, v11.x, v10.x, v9.x, v8.x, v7.x, v6.x
Other dependenciessymfony/polyfill-intl-normalizer, voku/portable-asciipharaonic/php-slugify
LicenseMITMIT

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.