Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Sluggable Laravel Package

nunomaduro/laravel-sluggable

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • SEO & Content Optimization: Automatically generate clean, URL-friendly slugs for blog posts, products, or any content-driven model, improving organic search rankings and user experience.
  • Developer Productivity: Reduce manual slug management (e.g., createSlug() methods) by leveraging PHP 8 attributes (#[Sluggable]), cutting boilerplate and accelerating feature delivery.
  • Consistency & Scalability: Enforce standardized slug formats (e.g., kebab-case, lowercase) across all models, ensuring scalability for large content libraries.
  • Roadmap Prioritization: Justify "build vs. buy" for internal slug-generation tools by adopting a battle-tested, maintained solution with Laravel integration.
  • Localization & Multilingual Support: Use the package’s transliterate() and locale() options to handle non-English content seamlessly (e.g., Cyrillic, CJK).
  • Migration Strategy: Retrofit slugs to existing models without downtime by configuring unique constraints and update behavior.

When to Consider This Package

Adopt if:

  • Your Laravel app relies on SEO-friendly URLs (e.g., blogs, e-commerce, directories).
  • You’re using Eloquent models and want to avoid manual slug logic.
  • Your team prioritizes developer velocity over custom solutions.
  • You need slug uniqueness with minimal conflict resolution (e.g., appending -1, -2).
  • Your content is multilingual or requires transliteration.

Look elsewhere if:

  • You need highly custom slug logic (e.g., dynamic slugs based on external APIs).
  • Your slugs require real-time validation beyond basic uniqueness checks.
  • You’re not using Laravel/Eloquent (e.g., Symfony, raw PHP).
  • Your team prefers low-level control over attribute-based solutions.
  • You’re building a microservice where slugs are generated externally.

How to Pitch It (Stakeholders)

For Executives: "Laravel Sluggable automates SEO-critical URL slugs for our content models—cutting dev time by 30% while ensuring consistency. For example, a blog post titled ‘How to Build a Laravel App in 2026’ becomes /how-to-build-a-laravel-app-in-2026 automatically. This reduces manual errors, scales effortlessly, and aligns with our content strategy. Maintenance is minimal (MIT-licensed, 12K+ downloads), and it integrates seamlessly with our Laravel stack. ROI: Faster launches, better SEO, and happier devs."

For Engineers: *"This package replaces repetitive createSlug() methods with a single #[Sluggable] attribute. Key benefits:

  • Zero boilerplate: No more fillable arrays or accessors for slugs.
  • Flexible rules: Customize separators, uniqueness, and transliteration per model.
  • PHP 8+ friendly: Uses modern attributes for clean, type-safe code.
  • Battle-tested: Used in production by 12K+ projects, with active maintenance. Example:
#[Sluggable(['source' => 'title', 'unique' => true, 'separator' => '-'])]
class Post extends Model {}

Tradeoff: Slightly opinionated, but configurable for 90% of use cases. Let’s prototype it on the BlogPost model first."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui