spatie/laravel-sluggable v4 introduces three major additions: a PHP attribute syntax for slug configuration (replacing the trait+method approach), self-healing URLs that embed the record ID in the route key so stale slugs redirect permanently to the current canonical URL using 308 instead of 301, and overridable action classes for customizing slug generation and route key parsing. The release also bundles a Laravel Boost MCP skill to help AI assistants generate correct sluggable model code.

5m read timeFrom freek.dev
Post cover image
Table of contents
Generating slugs with an attributeIn closing
5.4K Impressions