NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #981 most downloaded on Packagist
Generate slugs when saving Eloquent models
Latest stable
4.0.6
Last release 26 days ago
27 Oct 2026
Release timing varies
gaps range from 9 days to 10 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
62 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Restore the released 4.0.4 runtime code in a new forward corrective patch by @MohannadElemary and the maintainers in https://github.com/spatie/laravel
HasSlug with Laravel's HasUuids or HasUlids.resolveRouteBindingQuery() support added in 4.0.5, for both HasSlug and HasTranslatableSlug. The associated Filament/query-lookup and scoped child-binding improvements are not retained. This recovery does not introduce a new opt-in API.The complete src/ tree and runtime dependency requirements match 4.0.4 exactly. PHP/Laravel support requirements are unchanged. The Spatie-hosted README images and all published release history are preserved; no existing tags or releases were moved or replaced.
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/4.0.5...4.0.6
Fix self-healing route keys returning 404 through resolveRouteBindingQuery(), including Filament record lookups and Laravel scoped child bindings, by
Your coding agent can read these notes before it upgrades. Set up the MCP server →
resolveRouteBindingQuery(), including Filament record lookups and Laravel scoped child bindings, by @MohannadElemary in https://github.com/spatie/laravel-sluggable/pull/315 (fixes #314).No PHP or Laravel requirements changed.
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/4.0.4...4.0.5
Fix self-healing URLs returning 404 on routes using ->withTrashed() by @MohannadElemary in https://github.com/spatie/laravel-sluggable/pull/313 (fixes
Fix self-healing URLs returning 404 on routes using ->withTrashed() by @MohannadElemary in https://github.com/spatie/laravel-sluggable/pull/313 (fixes #312).
Canonical URLs now resolve for both active and soft-deleted models on routes that allow trashed bindings. Stale slugs redirect to the canonical URL with 308; routes without withTrashed() continue to exclude deleted models.
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/4.0.3...4.0.4
Fix unique slug generation when the slug or separator contains a LIKE wildcard (_, %, \) by @amrachraf6699 in https://github.com/spatie/laravel-slugga
Fix unique slug generation when the slug or separator contains a LIKE wildcard (_, %, \) by @amrachraf6699 in https://github.com/spatie/laravel-sluggable/pull/311
On drivers without a default LIKE escape character (SQLite), the slug-variant lookup silently matched nothing, so a separator like _ caused suffixes to be reused (foo_bar_1 twice instead of foo_bar_2).
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/4.0.2...4.0.3
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/4.0.0...4.0.1
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/4.0.0...4.0.1
v4 is mostly additive. Breaking changes are limited to minimum versions and a small handful of API removals. Full details in UPGRADING.md.
v4 is mostly additive. Breaking changes are limited to minimum versions and a small handful of API removals. Full details in UPGRADING.md.
#[Sluggable] attribute as a drop-in alternative to the HasSlug trait. Trait-based models keep working unchanged.hello-world-5) so renaming a model never breaks an existing link. Stale URLs return a 308 (was 301) so PUT/PATCH/DELETE keep working.config/sluggable.php.spatie/laravel-translatable v6+ when using HasTranslatableSlug. Pest 4 / Testbench 10+ in your test suite.skipGenerateWhen() is now evaluated on every save instead of once. The SlugOptions::\$skipGenerate boolean is gone in favor of \$skipGenerateWhen.generateSlugsFrom, extraScope, usingSuffixGenerator, skipGenerateWhen) are typed as Closure. Array/string callables need wrapping in a fn.HasSlug no longer keeps a protected \$slugOptions cache; override generateSlugAction() to inject custom behavior instead.308 Permanent Redirect.Sluggable facade was renamed to SelfHealing.See UPGRADING.md for migration steps.
Fix preventOverwrite for translatable slugs
preventOverwrite for translatable slugs (#304)Thanks to @jyrkidn for reporting and providing the initial fix in #302.
Add Laravel 13 and PHP 8.5 support
Also account for HasManyThrough / BelongsToMany relations by @mabdullahsari in https://github.com/spatie/laravel-sluggable/pull/291
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.4...3.7.5
Allow to generate custom suffixes by @josepdecid in https://github.com/spatie/laravel-sluggable/pull/289
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.3...3.7.4
Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/287
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.2...3.7.3
Fix query for translatable slug by @andrii-trush in https://github.com/spatie/laravel-sluggable/pull/285
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.1...3.7.2
Add explicit nullable type for additionalQuery parameter by @RomkaLTU in https://github.com/spatie/laravel-sluggable/pull/286
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.0...3.7.1
Changing reference to Laravel docs without Laravel version by @abishekrsrikaanth in https://github.com/spatie/laravel-sluggable/pull/274
findBySlug by @mkeremcansev in https://github.com/spatie/laravel-sluggable/pull/284Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.6.0...3.7.0
Bump dependabot/fetch-metadata from 1.4.0 to 1.5.1 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/257
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.5.0...3.6.0
Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/250
build status in README.md by @gomzyakov in https://github.com/spatie/laravel-sluggable/pull/252Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.4.2...3.5.0
- update for Laravel 10
Update README.md by @furiouskj in https://github.com/spatie/laravel-sluggable/pull/240
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.4.0...3.4.1
Converts Test cases to Pest tests by @marvin-wtt in https://github.com/spatie/laravel-sluggable/pull/223
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.3.1...3.4.0
Add support for spatie/laravel-translatable:^6.0 by @mziraki in https://github.com/spatie/laravel-sluggable/pull/224
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.3.0...3.3.1
- support Laravel 9
Adds support for implicit route model binding with translated slugs by @marvin-wtt in https://github.com/spatie/laravel-sluggable/pull/213
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.1.1...3.2.0
Fix Deprecation: currentSlug is null by @phh in https://github.com/spatie/laravel-sluggable/pull/218
Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.1.0...3.1.1
add extra scope callback option
bugfix for updating slugs generated from a callback
update slug on non unique names
move Exceptions to Exceptions folder to match structure of other packages
Exceptions folder to match structure of other packagesAdded translatable slug overriding
- fix Eloquent model checking
- add preventOverwrite - add support for PHP 8
preventOverwritefixed an incompatibility bug with postgresql uuid column
- add support for Laravel 8
add helper trait to integrate with laravel-translatable #155
laravel-translatable #155fix bug that causes empty slugs when dealing with multi-bytes chars
use method for retrieving incrementing status of the model
add support for Laravel 7, drop support for Laravel 6
drop support for anything below PHP 7.4 and Laravel 6
Nothing published for this version
Changed: Updated Laravel 6 compatibility for future versions
- Drop support for PHP 7.1 - Add support for Laravel 6.0
ensure slugs are unique when using soft deletes
- Add support for Laravel 5.8
- performance improvements
improve compatibility with json fields
- add support for Laravel 5.7
fix for models with non incrementing primary keys
- Support Laravel 5.6
improve compatibility with Lumen
- add usingLanguage
usingLanguageadd support for Laravel 5.5, drop support for all older versions of the framework
- make compatible with PHP 7.2
fix bugs when using a custom separator
- add usingSeparator()
usingSeparator()ignore global scopes when determining a unique slug
- add support for Laravel 5.4
add doNotGenerateSlugsOnCreate and doNotGenerateSlugsOnUpdate
doNotGenerateSlugsOnCreate and doNotGenerateSlugsOnUpdateAdded the ability to generate slugs from a callable
Added the ability to generate slugs from a callable
- Allow custom slugs
Fix bug when creating slug from null value
Fix bug when creating slug from null value
- Fix Postgres bug
One column per quarter.