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.
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.spatie/laravel-sluggable), ensuring alignment with the broader tech stack./blog/how-to-build-a-saas), improving discoverability and user experience at scale./products/premium-wireless-headphones) that update automatically when titles change, reducing 404 errors and improving internal linking./projects/abc-123) across teams, reducing ambiguity and improving navigation in SaaS platforms or enterprise applications.Str::slug()) for basic use cases, though advanced localization (e.g., language-specific rules) requires custom logic.title, name) with optional conditional logic (e.g., skip generation if another field exists).spatie/laravel-sluggable (MIT-licensed, feature-rich) or cviebrock/eloquent-sluggable.TextInput, limiting flexibility beyond standard Str::slug() behavior.spatie/laravel-sluggable (MIT) if needed.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:
Str::slug() calls or observers with 2 lines of code in a Filament Resource.other_field is empty) via closures.TextInput methods (rules, validation, etc.), so it integrates seamlessly with existing forms.
Potential Downsides:unique() with ignoreRecord).title → slug 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:
/blog?id=123 or /products?sku=ABC./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:
/blog/post-1, /blog/post-123) through auto-generation and uniqueness validation./blog/[topic])./es/blog/...) if needed?"*How can I help you explore Laravel packages today?