cviebrock/eloquent-sluggable
Easy creation of slugs for your Eloquent models in Laravel
13.0.1
15M downloads/mo
#1367 most downloaded on Packagist
cviebrock/eloquent-sluggable
What this package is like to depend on
Last release 1 months ago
20 Jul 2026
Release timing varies
gaps range from 3 weeks to 13 months
Most releases are documented
notes for 62 of 69 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
74 releases · first in 2013
2 releases in the last 12 months
see the full history below
Release timeline
74 releases · Jun 2013 to Jul 2026Releases
latest 60 of 74-
13.0.120 Jul 2026Release notes
Open source →- add
.gitattributesfile and reduce size of package archive (#630, thanks @hosni)
- add
-
13.0.019 Mar 2026 -
12.0.026 Feb 2025 -
11.0.129 Nov 2024Release notes
Open source →- Support PHP 8.4 (#616, thanks @SupianIDz)
- Notice that Lumen will be deprecated in the next major release
-
11.0.013 Mar 2024Release notes
Open source →- Added Laravel 11 support (#608, thanks @fulopattila122)
- Changed the minimum PHP version to 8.2 to line up with Laravel 11
- fix for larastan issue (#596, thanks @WalrusSoup)
-
10.0.016 Feb 2023 -
9.0.025 Jan 2022 -
8.0.812 Jun 2021Release notes
Open source →- fix event tests and
registerModelEvent()hook (#556, #561, thanks @standaniels)
- fix event tests and
-
8.0.719 May 2021Release notes
Open source →- fix issue with
SluggableObserver::SAVEDnot always saving the model (#558, #560, thanks @llewellyn-kevin)
- fix issue with
-
8.0.528 Feb 2021Release notes
Open source →- started unique suffixes with "-2" instead of "-1" (#549, thanks @Tamim26061)
- this can be adjusted via the
firstUniqueSuffixconfig setting
- this can be adjusted via the
- started unique suffixes with "-2" instead of "-1" (#549, thanks @Tamim26061)
-
8.0.420 Jan 2021 -
8.0.320 Jan 2021Release notes
Open source →- add ability to slug models on Eloquent's
savedevent, rather thansaving- this adds a few more SQL queries per save, but allows for the use of
the primary key field in the
sourceconfiguration (see #539 and #448) - default configuration remains the same, but might change in a future release
- this adds a few more SQL queries per save, but allows for the use of
the primary key field in the
- added base
customizeSlugEngineandscopeWithUniqueSlugConstraintsmethods to the trait, to enforce type hinting and return values- NOTE: if you were using these methods in your models, you may need to ensure the method signatures match now
- see #544 for more information, including what to do if you had custom methods in another trait
- add
slugEngineOptionsconfiguration option (see #454, thanks @Adioz01) - move automated testing from travis-ci to Github actions (#534, thanks @cbl)
- clean up some third-party tools and badges
- clean up docblocks, return hints, and PHPUnit method calls
- add ability to slug models on Eloquent's
-
8.0.229 Nov 2020 -
8.0.128 Sep 2020Release notes
Open source →- fix when manually setting a slug to a "falsy" value (#527, thanks @huiyang)
-
8.0.010 Sep 2020 -
7.0.208 Dec 2020Nothing published for this version
-
7.0.107 Apr 2020Release notes
Open source →- fix to help support translatable slugs (using either spatie or Astrotomic package) (#506, thanks @GeoSot)
-
7.0.005 Mar 2020 -
6.0.408 Dec 2020Nothing published for this version
-
6.0.309 Feb 2020 -
6.0.210 Oct 2019 -
6.0.114 Sep 2019 -
6.0.004 Sep 2019Release notes
Open source →- Laravel 6.0 support (note the package version will now follow the Laravel version)
-
4.8.109 Feb 2020Nothing published for this version
-
4.8.001 Mar 2019 -
4.7.106 Nov 2020Nothing published for this version
-
4.7.024 Feb 2019Release notes
Open source →- Fix slug getting set to
nullif model is updated with no source column loaded (#450, thanks @mylgeorge)
- Fix slug getting set to
-
4.6.106 Nov 2020Nothing published for this version
-
4.6.005 Sep 2018 -
4.5.206 Nov 2020Nothing published for this version
-
4.5.122 May 2018 -
4.5.011 Feb 2018 -
4.4.209 Feb 2020Nothing published for this version
-
4.4.104 Jan 2018Release notes
Open source →- Better exception message when calling
SlugService::createSlugwith an invalid attribute (#402, thanks @lptn) - Prettier unit test output
- Better exception message when calling
-
4.4.012 Dec 2017Release notes
Open source →- Make sure truncated slugs (due to maxLength) don't end in a separator (#398)
- Add
maxLengthKeepWordsconfiguration option (#398)
-
4.3.031 Aug 2017Release notes
Open source →- Laravel 5.5 support, including auto-registration
- Bumped
cocur/slugifyto^3.0
-
4.2.505 Sep 2017 -
4.2.404 Jul 2017 -
4.2.318 Apr 2017Release notes
Open source →- Switch to allow extending the class (#356, thanks @haddowg)
- Fix when adding suffixes to reserved slugs (#356, thanks @haddowg)
-
4.2.223 Mar 2017Release notes
Open source →- Better handling of numeric and boolean slug sources (#351, thanks @arturock)
-
4.2.101 Feb 2017 -
4.1.209 Nov 2016Release notes
Open source →- Fix in
getExistingSlugswhen using global scopes (#327) - Update
Cocur\Slugifyto^2.3.
- Fix in
-
4.1.112 Oct 2016Release notes
Open source →- Fix for slugs updating when they don't need to, when using
onUpdatewithunique(#317)
- Fix for slugs updating when they don't need to, when using
-
4.1.014 Sep 2016Release notes
Open source →- The goal of the 4.1.x releases will be to focus on support in Laravel 5.3, only providing support for 5.1/5.2 where it is easy and doesn't affect performance significantly.
- Drop support for PHP <5.6 and HHVM (no longer supported by Laravel 5.3); fixes test build process
-
4.0.413 Sep 2016Release notes
Open source →- Fix
SluggableScopeHelpersto work when using the short configuration syntax (#314).
- Fix
-
4.0.315 Jul 2016Release notes
Open source →- Added
$configargument toSlugService::createSlugmethod for optionally overriding the configuration for a statically generated slug (#286).
- Added
-
4.0.217 Jun 2016Release notes
Open source →- Added
SluggableScopeHelperstrait which restores some of the scoping and query functionality of the 3.x version of the package (#280, thanks @unstoppablecarl and @Keoghan). - Added the
onUpdateconfiguration option back to the package. - Updated the documentation to show usage of the
SluggableScopeHelperstrait, and how to use route model binding with slugs.
- Added
-
4.0.113 Jun 2016 -
4.0.010 Jun 2016Release notes
Open source →- Fix for Laravel 5.1 (#263 thanks @roshangautam and @andregaldino).
- Update
Cocur\Slugifyto^2.1(#269 thanks @shadoWalker89).
-
4.0.0-beta01 Jun 2016 pre-releaseRelease notes
Open source →- Major revision
- Model configuration is now handled in a
sluggable()method. on the model instead of a property, and configuration options are now camelCase - Ability to generate more than one slug per model.
- Removed all
findBy...()scope/methods (can't really be used when a model has multiple slugs ... plus the code is easy enough to implement in the model). - Removed
onUpdateconfiguration option. If you want to re-generate a slug on update, then set the model's slug tonullbefore saving. Otherwise, existing slugs will never be overwritten. createSlug()is no longer a static method on the model, but is a public method on the SlugService class, with a different method signature (see docs).- Removed artisan command to add slug column to tables. You will need to do this (pretty simple) task yourself now.
- Several bug fixes.
- Model configuration is now handled in a
- See UPGRADING.md for details.
- Major revision
-
3.1.403 Jan 2016Release notes
Open source →- Compatible with Laravel 5.2 (by removing calls to composer from migrate command)
-
3.1.307 Dec 2015 -
3.1.207 Nov 2015Release notes
Open source →- Fix some namespacing issues in docblocks (#195)
- Streamline artisan migrate call (#191 thanks @ntzm)
- Fix bug when using magic getters (#188 thanks @ChrisReid)
- Add a static slug generator (#185 thanks @phroggyy)
- Lots of PSR-2 fixes
-
3.1.126 Oct 2015Release notes
Open source →- Fix missing class reference (#192)
- Clean up migration code (#191 thanks @natzim)
- Fix when using magic getters (#188 thanks @ChrisReid)
-
3.1.014 Oct 2015Release notes
Open source →- Convert code-base to PSR-2
- If the source is empty, then set the slug to
null(#162 thanks @PallMallShow) - Ability to use a model's relations in the
build_fromconfiguration (#171 thanks @blaxxi) - Added
getSlugEngine()method so that the Cocur\Slugify class can be configured - Updated the migration stub for Laravel 5.1's PSR-2 changes (#174 thanks @39digits)
- Added
sluggingandsluggedEloquent model events - Fix for
findBySlugOrId()methods when the slug is numeric (#161 thanks @canvural) - Add static method
Model::createSlug('some string')(#185 thanks @phroggyy)
-
3.0.006 Jul 2015Release notes
Open source →- Don't increment unique suffix if slug is unchanged (#108 thanks @kkiernan)
-
3.0.0-beta13 Jun 2015 pre-releaseRelease notes
Open source →- Laravel 5.1 support (#141/#148 thanks @Keoghan, @Bouhnosaure)
- Removed
use_cacheoption and support - Use (Cocur\Slugify)[https://github.com/cocur/slugify] as default slugging method
- Fix for
include_trashedoption not working for models that inherit the SoftDeletes trait (#136 thanks @ramirezd42) - Added
generateSuffix()method so you could use different strategies other than integers for making incremental slugs (#129 thanks @EspadaV8) - Various scope and lookup fixes (thanks @xire28)
-
3.0.0-alpha11 Feb 2015 pre-releaseRelease notes
Open source →- Laravel 5.0 support
- Remove Ardent support and tests
- Fix so that
max_lengthoption only applies to string slugs (#64 thanks @enzomaserati)
-
2.0.513 Nov 2014Release notes
Open source →- Fixed
findBySlug()to return a model andgetBySlug()to return a collection (#72 thanks @jaewun and @Jono20202) - Fixed testbench version requirements (#87 thanks @hannesvdvreken)
- Fixed so that
max_lengthoption only applies to string slugs (#64 thanks @enzomaserati) - Cleaned up some redundant code and documentation (thanks @hannesvdvreken, @Anahkiasen, @nimbol)
- Fixed
-
2.0.424 Sep 2014Release notes
Open source →- Fixed softDelete behaviour and tests so Laravel 4.2 and earlier are supported (#56 thanks @hammat).
- Fixed alias for
Illuminate\Support\Strto prepare for Laravel 4.3/5.0 (#58 thanks @0xMatt).