martinbean/laravel-sluggable-trait
Adopt if:
/blog/my-awesome-post).title or name column).Look elsewhere if:
unique validation).save())."This package automates SEO-friendly URL generation for our content, reducing manual work and improving user experience. For example, a blog post titled ‘How to Build a Laravel App’ would automatically generate /blog/how-to-build-a-laravel-app—no developer effort required. It’s a low-risk, high-reward upgrade that aligns with our goals for scalability and developer productivity. The cost is minimal (a single Composer package), and the benefits include faster content publishing and better search rankings."
"This trait cuts down on repetitive slug logic across Eloquent models. With a single line (use Sluggable), we get automatic slug generation on save, configurable column names, and basic uniqueness handling. It’s lightweight, well-documented, and integrates seamlessly with Laravel. For edge cases (e.g., multi-field slugs or custom rules), we can override methods—no need to rewrite the wheel. Let’s adopt this for new models and evaluate migration for existing ones where slugs are manually managed."
How can I help you explore Laravel packages today?