PackageTrack
Sign in Get early access

spatie/laravel-sluggable

Generate slugs when saving Eloquent models

4.0.3 14M downloads/mo #1004 most downloaded on Packagist spatie/laravel-sluggable

What this package is like to depend on

Last release 26 days ago

28 Jul 2026

Release timing varies

gaps range from 2 weeks to 10 months

Most releases are documented

notes for 53 of 59 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

59 releases · first in 2015

5 releases in the last 12 months

see the full history below

Release timeline

59 releases · Dec 2015 to Jul 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 59
  1. 4.0.3 28 Jul 2026
    Release notes

    What's Changed

    • Fix unique slug generation when the slug or separator contains a LIKE wildcard (_, %, \) by @amrachraf6699 in #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: 4.0.2...4.0.3

    Open source →
    Release notes

    What's Changed

    • 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

    Open source →
  2. 4.0.1 29 Apr 2026
    Release notes

    Full Changelog: 4.0.0...4.0.1

    Open source →
    Release notes

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/4.0.0...4.0.1

    Open source →
  3. 4.0.0 27 Apr 2026
    Release notes

    v4 is mostly additive. Breaking changes are limited to minimum versions and a small handful of API removals. Full details in UPGRADING.md.

    Highlights

    • #[Sluggable] attribute as a drop-in alternative to the HasSlug trait. Trait-based models keep working unchanged.
    • Self-healing URLs: route keys that combine the slug with the primary key (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.
    • Overridable actions: swap the slug generator or self-healing URL builder/parser via config/sluggable.php.
    • Laravel Boost skill bundled with the package for AI assistants.

    Breaking changes

    • Minimum PHP 8.3 and Laravel 12. 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.
    • The closure-shaped options (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.
    • Self-healing redirects default to 308 Permanent Redirect.
    • The Sluggable facade was renamed to SelfHealing.

    See UPGRADING.md for migration steps.

    Open source →
    Release notes

    v4 is mostly additive. Breaking changes are limited to minimum versions and a small handful of API removals. Full details in UPGRADING.md.

    Highlights

    • #[Sluggable] attribute as a drop-in alternative to the HasSlug trait. Trait-based models keep working unchanged.
    • Self-healing URLs: route keys that combine the slug with the primary key (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.
    • Overridable actions: swap the slug generator or self-healing URL builder/parser via config/sluggable.php.
    • Laravel Boost skill bundled with the package for AI assistants.

    Breaking changes

    • Minimum PHP 8.3 and Laravel 12. 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.
    • The closure-shaped options (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.
    • Self-healing redirects default to 308 Permanent Redirect.
    • The Sluggable facade was renamed to SelfHealing.

    See UPGRADING.md for migration steps.

    Open source →
  4. 3.8.1 23 Mar 2026
    Release notes

    What's Changed

    • Fix preventOverwrite for translatable slugs (#304)

    Thanks to @jyrkidn for reporting and providing the initial fix in #302.

    Open source →
    Release notes

    What's Changed

    • Fix preventOverwrite for translatable slugs (#304)

    Thanks to @jyrkidn for reporting and providing the initial fix in #302.

    Open source →
  5. 3.8.0 21 Feb 2026
    Release notes

    What's Changed

    • Add Laravel 13 and PHP 8.5 support
    • Drop Laravel 8/9 and PHP 8.0/8.1 (EOL)
    Open source →
    Release notes

    What's Changed

    • Add Laravel 13 and PHP 8.5 support
    • Drop Laravel 8/9 and PHP 8.0/8.1 (EOL)
    Open source →
  6. 3.7.5 24 Apr 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.7.4...3.7.5

    Open source →
    Release notes

    What's Changed

    • Also account for HasManyThrough / BelongsToMany relations by @mabdullahsari in https://github.com/spatie/laravel-sluggable/pull/291

    New Contributors

    • @mabdullahsari made their first contribution in https://github.com/spatie/laravel-sluggable/pull/291

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.4...3.7.5

    Open source →
  7. 3.7.4 28 Feb 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.7.3...3.7.4

    Open source →
    Release notes

    What's Changed

    • Allow to generate custom suffixes by @josepdecid in https://github.com/spatie/laravel-sluggable/pull/289

    New Contributors

    • @josepdecid made their first contribution in https://github.com/spatie/laravel-sluggable/pull/289

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.3...3.7.4

    Open source →
  8. 3.7.3 20 Feb 2025
    Release notes

    What's Changed

    Full Changelog: 3.7.2...3.7.3

    Open source →
    Release notes

    What's Changed

    • Bump dependabot/fetch-metadata from 2.2.0 to 2.3.0 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/287
    • Laravel 12.x Compatibility by @laravel-shift in https://github.com/spatie/laravel-sluggable/pull/288

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.2...3.7.3

    Open source →
  9. 3.7.2 30 Dec 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.7.1...3.7.2

    Open source →
    Release notes

    What's Changed

    • Fix query for translatable slug by @andrii-trush in https://github.com/spatie/laravel-sluggable/pull/285

    New Contributors

    • @andrii-trush made their first contribution in https://github.com/spatie/laravel-sluggable/pull/285

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.1...3.7.2

    Open source →
  10. 3.7.1 23 Dec 2024
    Release notes

    What's Changed

    • Add explicit nullable type for additionalQuery parameter by @RomkaLTU in #286

    New Contributors

    Full Changelog: 3.7.0...3.7.1

    Open source →
    Release notes

    What's Changed

    • Add explicit nullable type for additionalQuery parameter by @RomkaLTU in https://github.com/spatie/laravel-sluggable/pull/286

    New Contributors

    • @RomkaLTU made their first contribution in https://github.com/spatie/laravel-sluggable/pull/286

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.7.0...3.7.1

    Open source →
  11. 3.7.0 09 Dec 2024
    Release notes

    What's Changed

    • Changing reference to Laravel docs without Laravel version by @abishekrsrikaanth in https://github.com/spatie/laravel-sluggable/pull/274
    • Bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/278
    • Bump dependabot/fetch-metadata from 2.1.0 to 2.2.0 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/281
    • Add Fallback Locale and Additional Query Support to findBySlug by @mkeremcansev in https://github.com/spatie/laravel-sluggable/pull/284

    New Contributors

    • @abishekrsrikaanth made their first contribution in https://github.com/spatie/laravel-sluggable/pull/274
    • @mkeremcansev made their first contribution in https://github.com/spatie/laravel-sluggable/pull/284

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.6.0...3.7.0

    Open source →
  12. 3.6.0 26 Feb 2024
    Release notes

    What's Changed

    • Bump dependabot/fetch-metadata from 1.4.0 to 1.5.1 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/257
    • Bump dependabot/fetch-metadata from 1.5.1 to 1.6.0 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/261
    • Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/264
    • Add laravel 11 support by @mokhosh in https://github.com/spatie/laravel-sluggable/pull/271

    New Contributors

    • @mokhosh made their first contribution in https://github.com/spatie/laravel-sluggable/pull/271

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.5.0...3.6.0

    Open source →
  13. 3.5.0 29 May 2023
    Release notes

    What's Changed

    • Bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/250
    • Fix badge with build status in README.md by @gomzyakov in https://github.com/spatie/laravel-sluggable/pull/252
    • Bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/255
    • feat: add findBySlug alias by @IsraelOrtuno in https://github.com/spatie/laravel-sluggable/pull/256

    New Contributors

    • @gomzyakov made their first contribution in https://github.com/spatie/laravel-sluggable/pull/252
    • @IsraelOrtuno made their first contribution in https://github.com/spatie/laravel-sluggable/pull/256

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.4.2...3.5.0

    Open source →
  14. 3.4.2 23 Jan 2023
    Release notes
    • update for Laravel 10
    Open source →
  15. 3.4.1 07 Dec 2022
    Release notes

    What's Changed

    • Update README.md by @furiouskj in https://github.com/spatie/laravel-sluggable/pull/240
    • composer allow-plugins config by @hotsaucejake in https://github.com/spatie/laravel-sluggable/pull/241
    • Normalize composer.json by @patinthehat in https://github.com/spatie/laravel-sluggable/pull/247
    • Add Dependabot Automation by @patinthehat in https://github.com/spatie/laravel-sluggable/pull/246
    • Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/laravel-sluggable/pull/245
    • Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/spatie/laravel-sluggable/pull/248
    • Allow set slug suffix starting number by @Vediovis in https://github.com/spatie/laravel-sluggable/pull/249

    New Contributors

    • @furiouskj made their first contribution in https://github.com/spatie/laravel-sluggable/pull/240
    • @hotsaucejake made their first contribution in https://github.com/spatie/laravel-sluggable/pull/241
    • @dependabot made their first contribution in https://github.com/spatie/laravel-sluggable/pull/248
    • @Vediovis made their first contribution in https://github.com/spatie/laravel-sluggable/pull/249

    Full Changelog: https://github.com/spatie/laravel-sluggable/compare/3.4.0...3.4.1

    Open source →
  16. 3.4.0 28 Mar 2022

    Nothing published for this version

  17. 3.3.1 09 Mar 2022

    Nothing published for this version

  18. 3.3.0 13 Jan 2022
    Release notes
    • support Laravel 9
    Open source →
  19. 3.2.0 15 Dec 2021

    Nothing published for this version

  20. 3.1.1 13 Dec 2021

    Nothing published for this version

  21. 3.1.0 04 Jun 2021
    Release notes
    • add extra scope callback option (#201)
    Open source →
  22. 3.0.2 07 May 2021
    Release notes
    • bugfix for updating slugs generated from a callback (#200)
    Open source →
  23. 3.0.1 22 Apr 2021
    Release notes
    • update slug on non unique names (#195)
    Open source →
  24. 3.0.0 26 Mar 2021
    Release notes
    • require PHP 8+
    • drop support for PHP 7.x
    • convert syntax to PHP 8
    • move Exceptions to Exceptions folder to match structure of other packages
    Open source →
  25. 2.6.2 20 Mar 2021
    Release notes
    • Added translatable slug overriding (#190)
    Open source →
  26. 2.6.1 31 Jan 2021
    Release notes
    • fix Eloquent model checking (#186)
    Open source →
  27. 2.6.0 28 Oct 2020
    Release notes
    • add preventOverwrite
    • add support for PHP 8
    Open source →
  28. 2.5.2 01 Oct 2020
    Release notes
    • fixed an incompatibility bug with postgresql uuid column (#173)
    Open source →
  29. 2.5.1 08 Sep 2020
    Release notes
    • add support for Laravel 8
    Open source →
  30. 2.5.0 15 Jun 2020
    Release notes
    • add helper trait to integrate with laravel-translatable #155
    Open source →
  31. 2.4.2 20 Apr 2020
    Release notes
    • fix bug that causes empty slugs when dealing with multi-bytes chars (#152)
    Open source →
  32. 2.4.1 09 Apr 2020
    Release notes
    • use method for retrieving incrementing status of the model (#151)
    Open source →
  33. 2.4.0 03 Mar 2020
    Release notes
    • add support for Laravel 7, drop support for Laravel 6
    Open source →
  34. 2.3.0 06 Dec 2019
    Release notes
    • drop support for anything below PHP 7.4 and Laravel 6
    Open source →
  35. 2.2.2 06 Apr 2020

    Nothing published for this version

  36. 2.2.1 16 Sep 2019
    Release notes
    • Changed: Updated Laravel 6 compatibility for future versions
    Open source →
  37. 2.2.0 04 Sep 2019
    Release notes
    • Drop support for PHP 7.1
    • Add support for Laravel 6.0
    Open source →
  38. 2.1.8 08 Jun 2019
    Release notes
    • ensure slugs are unique when using soft deletes
    Open source →
  39. 2.1.7 27 Feb 2019
    Release notes
    • Add support for Laravel 5.8
    Open source →
  40. 2.1.6 14 Feb 2019
    Release notes
    • performance improvements
    Open source →
  41. 2.1.5 10 Jan 2019
    Release notes
    • improve compatibility with json fields
    Open source →
  42. 2.1.4 28 Aug 2018
    Release notes
    • add support for Laravel 5.7
    Open source →
  43. 2.1.3 15 Feb 2018
    Release notes
    • fix for models with non incrementing primary keys
    Open source →
  44. 2.1.2 08 Feb 2018
    Release notes
    • Support Laravel 5.6
    Open source →
  45. 2.1.1 28 Jan 2018
    Release notes
    • improve compatibility with Lumen
    Open source →
  46. 2.1.0 13 Sep 2017
    Release notes
    • add usingLanguage
    Open source →
  47. 2.0.0 30 Aug 2017
    Release notes
    • add support for Laravel 5.5, drop support for all older versions of the framework
    Open source →
  48. 1.5.2 08 May 2018
    Release notes
    • make compatible with PHP 7.2
    Open source →
  49. 1.5.1 19 Aug 2017
    Release notes
    • fix bugs when using a custom separator
    Open source →
  50. 1.5.0 13 Apr 2017
    Release notes
    • add usingSeparator()
    Open source →
  51. 1.4.1 12 Apr 2017
    Release notes
    • ignore global scopes when determining a unique slug
    Open source →
  52. 1.4.0 24 Jan 2017
    Release notes
    • add support for Laravel 5.4
    Open source →
  53. 1.3.0 14 Nov 2016
    Release notes
    • add doNotGenerateSlugsOnCreate and doNotGenerateSlugsOnUpdate
    Open source →
  54. 1.2.0 13 Jun 2016
    Release notes
    • Added the ability to generate slugs from a callable
    Open source →
  55. 1.1.0 24 Jan 2016
    Release notes
    • Allow custom slugs
    Open source →
  56. 1.0.2 12 Jan 2016
    Release notes
    • Fix bug when creating slugs from null values
    Open source →
  57. 1.0.1 27 Dec 2015
    Release notes
    • Fix Postgres bug
    Open source →
  58. 1.0.0 24 Dec 2015
    Release notes
    • Initial release
    Open source →
  59. 0.0.1 24 Dec 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive