- How do I install `blendbyte/filament-title-with-slug` in a Laravel 13 project?
- Run `composer require blendbyte/filament-title-with-slug` and ensure your `filament/filament` package is pinned to v5.x in `composer.json`. The package supports Laravel 11–13 and Filament v5 exclusively.
- Does this package support auto-generating slugs from custom title formats?
- Yes, it auto-generates slugs from titles by default (e.g., `Hello World` → `hello-world`). You can customize the slug logic using `slugRules()` or `customSlug()` methods in the field configuration.
- Can I preview the permalink before saving in Filament?
- Absolutely. The package includes a live permalink preview feature, so users can see the generated URL in real-time as they type the title or edit the slug manually.
- Will this work with multilingual slugs (e.g., locale-specific URLs)?
- The package itself doesn’t handle multilingual slugs natively, but you can extend it using Filament’s `modify()` method or middleware to append locale prefixes (e.g., `/en/hello-world`).
- Is there a way to enforce unique slugs across all resources?
- Yes, use the `slugRules()` method to add validation, like `slugRules(['unique:posts,slug'])` in your field configuration. This ensures slugs are unique in your database.
- Does this package support inline editing for slugs in Filament tables?
- Yes, the package is designed for inline editing in Filament forms and tables. Slugs can be edited directly in the UI without leaving the resource page.
- What happens if two titles generate the same slug? Can I add suffixes like `-2`?
- The package doesn’t include built-in suffix logic, but you can implement it via `customSlug()` or middleware. For example, append `-1`, `-2` to duplicates during slug generation.
- Are there performance concerns with auto-slug generation for large datasets?
- For high-volume datasets, consider caching slug generation logic or using database indexes on slug fields. The package itself doesn’t include optimizations for bulk operations.
- Can I use this with Filament v4 or older Laravel versions?
- No, this package is **Filament v5-only** and supports Laravel 11–13. For Filament v4, use the deprecated `camya/filament-title-with-slug` package (v2.x), but it’s no longer maintained.
- How do I customize the slug format (e.g., kebab-case vs. snake_case)?
- Use the `slugRules()` method to define custom formats. For kebab-case, the default works out of the box. For snake_case, override the `slugify()` logic via `customSlug()` or a wrapper class.