nunomaduro

Laravel Sluggable is my opinionated take on automatic slug generation for Eloquent models

46
1
100% credibility
Found Apr 18, 2026 at 46 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
PHP
AI Summary

A tool for Laravel applications that automatically creates clean, URL-friendly slugs from model attributes like titles, handling uniqueness, languages, and edge cases.

How It Works

1
🔍 Discover the tool

While building a blog or website, you hear about a simple way to turn titles into clean web addresses like 'hello-world' instead of messy numbers.

2
📦 Add to your project

You easily bring this helpful tool into your existing website project with a quick addition.

3
Set up for your content

You tell the tool which pieces of content, like blog posts, should get these friendly web names based on their titles.

4
🔄 Prepare your storage

You make a small update to your data storage to save room for these new friendly names.

5
✍️ Create new content

You add a new blog post or item, giving it a title like 'My First Adventure'.

🎉 Enjoy automatic magic

Instantly, your content gets a perfect, readable web address like 'my-first-adventure', ready for sharing and linking.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 46 to 46 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is laravel-sluggable?

Laravel Sluggable is a PHP package for Laravel 12+ that auto-generates SEO-friendly slugs for Eloquent models with one attribute declaration. Drop it on a model like Post, and it pulls from fields such as title or name to create unique slugs like "hello-world", saving them to a slug column on create or update. It tackles common pains like Unicode transliteration, collision resolution, scoped uniqueness per tenant or locale, and domain-aware dot preservation—no manual string munging required.

Why is it gaining traction?

Unlike cviebrock eloquent sluggable for Laravel 10 or 11, which relies on traits, this uses modern PHP attributes for zero-boilerplate wiring, appealing to devs ditching legacy laravel sluggable packages like spatie or cviebrock variants. The `php artisan make:sluggable Post` command instantly adds the attribute, guesses source columns, and scaffolds a migration, slashing setup time. Robust handling of CJK scripts, emojis, and soft deletes stands out in real-world tests, with GitHub Actions ensuring clean deploys.

Who should use this?

Backend Laravel developers building blogs, e-commerce sites, or CMS apps where clean URLs from titles drive SEO. Multi-tenant SaaS teams needing per-team or per-locale unique slugs without custom queries. Anyone migrating from older cviebrock eloquent sluggable on Laravel 12, seeking a lighter trait-free alternative.

Verdict

Promising fresh take with excellent docs and user-friendly CLI, but at 46 stars and 1.0% credibility score, it's immature—test thoroughly before production. Grab it if you're on Laravel 12+ and want attribute-driven simplicity over bloated laravel sluggable traits.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.