- How do I add SEO fields to a Filament resource without breaking existing functionality?
- Simply include the `SEO::make()` component in your resource’s form schema. The package automatically handles saving/loading data to the `seo()` relationship, so no additional configuration is needed. Just ensure your model uses the `HasSEO` trait.
- Does this package support Filament v3.x’s resource builder API?
- Yes, the package is designed to work with Filament v3.x. The `SEO::make()` component integrates seamlessly with the resource builder API, allowing you to add SEO fields to both classic and builder-style resources.
- What happens if I don’t have the `laravel-seo` package installed?
- The package will automatically install `ralphjsmit/laravel-seo` as a dependency during installation. However, you’ll still need to configure the `seo.php` config file as per the [laravel-seo documentation](https://github.com/ralphjsmit/laravel-seo).
- Can I customize SEO fields (e.g., add OpenGraph properties) beyond the default meta title/description?
- The package provides a clean UI for core SEO fields, but you can extend it by overriding the `SEO` component or using Filament’s field customization. For advanced OpenGraph/Twitter cards, refer to the `laravel-seo` package’s documentation for additional configuration options.
- Will this package work with multilingual sites (e.g., Spatie Laravel Translatable)?
- Yes, the package supports locale-specific SEO rules if your models use translations. The `seo()` relationship can be scoped per locale, but ensure your `seo.php` config is properly set up for localization. Test with a few locales to confirm behavior.
- How does this handle canonical URLs and noindex/nofollow tags?
- Canonical URLs and noindex/nofollow tags are managed through the underlying `laravel-seo` package. The Filament UI exposes these fields as part of the `SEO::make()` component, so you can set them directly in your admin panel without manual Blade or middleware changes.
- Is there a performance impact when generating SEO metadata for thousands of pages?
- The package is optimized for performance, but generating structured data dynamically can still add overhead. For large-scale sites, cache the SEO-generated output (e.g., JSON-LD) using Laravel’s cache or a service like Redis. Benchmark with your expected traffic load.
- What’s the fallback behavior if the `seo()` relationship fails or the model lacks `HasSEO`?
- If the `seo()` relationship is missing or the model doesn’t use `HasSEO`, the package will silently skip SEO field rendering in Filament. No errors are thrown, but SEO metadata won’t be saved or displayed. Always ensure your models include the trait.
- Can I use this package with Filament plugins or custom admin panels?
- Yes, the `SEO::make()` component is a standalone Filament fieldgroup and can be used in any Filament-based admin panel, including plugins. However, non-Filament admin panels (e.g., Nova) will require manual integration with the `laravel-seo` package.
- Are there alternatives if I need more advanced SEO features (e.g., rich snippets, schema.org)?
- For advanced schema.org or rich snippets, consider extending the `laravel-seo` package directly or using dedicated tools like `spatie/laravel-seo` or `themsaid/laravel-schema`. This package focuses on Filament integration, so it may not cover all niche SEO use cases.