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 Filament Slug Laravel Package

novius/laravel-filament-slug

Adds a Slug form field for Laravel Filament. Generate slugs from a TextInput, optionally conditionally, while keeping TextInput features like validation rules and unique checks. Requires PHP 8.2+, Laravel 11+, Filament 4.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • SEO & Content Optimization: Automates slug generation for content-driven applications (e.g., blogs, e-commerce, or documentation platforms), directly improving URL structure, crawlability, and search rankings. Reduces reliance on manual slug creation, ensuring consistency and scalability across thousands of records.
  • Developer Velocity: Eliminates repetitive slug-generation logic (e.g., Str::slug() in controllers, observers, or model boot methods) by providing a reusable, declarative Filament form field. Lowers cognitive load for teams maintaining Filament admin panels, allowing developers to focus on core business logic.
  • Roadmap Justification: Validates investment in Filament for content management by offering a native solution for a critical but often overlooked feature (slugs). Strengthens the case for adopting Filament over custom admin builds or legacy systems (e.g., Backpack, Nova) where slugs require manual handling.
  • Build vs. Buy Decision: Avoids reinventing slug-generation wheels while staying within Filament’s ecosystem. Reduces technical debt compared to custom solutions or third-party packages not tailored to Filament (e.g., spatie/laravel-sluggable), ensuring alignment with the broader tech stack.
  • Use Cases:
    • CMS Platforms: Auto-generate SEO-friendly slugs for articles, pages, or categories (e.g., /blog/how-to-build-a-saas), improving discoverability and user experience at scale.
    • E-commerce: Create dynamic, clean product URLs (e.g., /products/premium-wireless-headphones) that update automatically when titles change, reducing 404 errors and improving internal linking.
    • Internal Tools: Standardize resource URLs (e.g., /projects/abc-123) across teams, reducing ambiguity and improving navigation in SaaS platforms or enterprise applications.
    • Localization (Basic): Supports simple multilingual slugs (via Str::slug()) for basic use cases, though advanced localization (e.g., language-specific rules) requires custom logic.
    • Bulk Operations: Integrates seamlessly with Filament’s table actions to generate or update slugs for existing records without manual edits, enabling data migration or cleanup workflows.

When to Consider This Package

  • Adopt When:
    • Your project uses Laravel 11+ and Filament 4+ for admin panels, and slugs are a recurring need (e.g., content management, e-commerce, or internal tools).
    • You prioritize developer efficiency and want to eliminate repetitive slug-generation logic in controllers, observers, or model boot methods.
    • Slugs are derived from a single field (e.g., title, name) with optional conditional logic (e.g., skip generation if another field exists).
    • Your team is already invested in Filament’s ecosystem and wants to minimize dependencies while keeping the solution simple and maintainable.
    • You need basic validation (e.g., uniqueness, regex patterns) for slugs without complex business rules (e.g., multi-field sources, custom separators).
    • SEO or URL consistency is a priority, and manual slug management is a bottleneck (e.g., high-volume content creation).
  • Look Elsewhere If:
    • You’re not using Filament: This package is Filament-specific. For vanilla Laravel, consider spatie/laravel-sluggable (MIT-licensed, feature-rich) or cviebrock/eloquent-sluggable.
    • Slugs require complex generation logic (e.g., multi-field sources, custom separators, or language-specific rules). This package inherits from TextInput, limiting flexibility beyond standard Str::slug() behavior.
    • Your project needs client-side slug previews (e.g., real-time updates as users type). This package handles server-side generation; pair with JavaScript (e.g., Alpine.js, Livewire) if needed.
    • You’re using Laravel <11.0 or Filament <4.0: Compatibility constraints may require forks or workarounds, increasing maintenance overhead.
    • High-traffic applications: The package’s low adoption (2 stars) and lack of dependents suggest unproven scalability. Benchmark performance if slug generation is a bottleneck (e.g., >10K records/sec).
    • Open-source licensing concerns: The AGPLv3 license may conflict with proprietary projects. Evaluate alternatives like spatie/laravel-sluggable (MIT) if needed.
    • You need advanced collision handling: The package doesn’t include built-in logic for duplicate slugs (e.g., auto-increment suffixes). Custom validation or database constraints are required.
    • Legacy systems: If your admin panel is built with Backpack, Nova, or a custom solution, integrating this package may not be feasible without significant refactoring.

How to Pitch It (Stakeholders)

For Executives: "This package automates the creation of clean, SEO-friendly URLs (slugs) in our Filament admin panels with zero manual effort. For example, a blog post titled ‘How to Scale Your Startup’ would automatically generate /blog/how-to-scale-your-startup, saving development time and improving our content’s search rankings. It’s a low-cost, high-impact solution that standardizes URLs across our [CMS/e-commerce/internal tools] without adding technical debt. The risk is minimal—it’s a lightweight Filament extension with no long-term maintenance burden. This aligns with our goals of [improving developer velocity/SEO/UX] while keeping our tech stack lean and scalable. ROI: Estimated 10–20 hours saved annually on manual slug management for [X] content items."

For Engineers: *"This is a simple, drop-in Filament form field that handles slug generation (e.g., from a title field) with validation and dynamic logic. Key advantages:

  • No Boilerplate: Replaces manual Str::slug() calls or observers with 2 lines of code in a Filament Resource.
  • Flexible: Supports conditional generation (e.g., skip if other_field is empty) via closures.
  • Filament-Native: Inherits all TextInput methods (rules, validation, etc.), so it integrates seamlessly with existing forms. Potential Downsides:
  • Low Adoption: Only 2 stars, but the code is straightforward and AGPL-licensed. If issues arise, we can fork it easily.
  • No Collision Handling: Duplicate slugs require custom validation or database constraints (e.g., unique() with ignoreRecord).
  • Basic Use Cases Only: Best for titleslug scenarios. For complex rules (e.g., multi-field sources), we might need to extend it or use spatie/laravel-sluggable. Recommendation: Worth adopting for Filament-based projects where slugs are a pain point. Start with a pilot in one Resource to validate edge cases before wider rollout. Alternatives: If Filament isn’t a hard requirement, spatie/laravel-sluggable offers more features but requires integration effort."*

For Designers/Product Managers: *"This tool ensures our content—like blog posts, product pages, or internal resources—always has clean, user-friendly URLs without manual effort. For example:

  • Before: URLs might look messy, like /blog?id=123 or /products?sku=ABC.
  • After: Auto-generated slugs like /blog/how-to-launch-a-startup or /products/premium-headphones improve both user experience and SEO. This is a small technical change with a big impact—no need for designers to worry about implementation, just the outcome. It’s a quick win for making our platform more professional and search-friendly. Ask: Are there specific URL formats or SEO requirements we should communicate to the dev team to ensure consistency?"*

For Data/SEO Teams: *"This package directly supports our SEO and content strategy by:

  1. Eliminating duplicate or inconsistent slugs (e.g., /blog/post-1, /blog/post-123) through auto-generation and uniqueness validation.
  2. Improving crawlability by ensuring every piece of content has a clean, predictable URL structure (e.g., /blog/[topic]).
  3. Reducing 404 errors from broken links or manual slug mismatches. Key Considerations:
  • Should we enforce slug length limits (e.g., max 50 chars) for performance?
  • Do we need custom validation (e.g., keyword inclusion/exclusion) beyond the package’s regex support?
  • How will we handle multilingual slugs (e.g., /es/blog/...) if needed?"*
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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle