- How do I install SEOTools in Laravel 5.8+?
- Run `composer require artesaos/seotools` to install via Composer. Laravel 5.5+ automatically handles package discovery, so no manual provider registration is needed. For Laravel 11+, update `bootstrap/providers.php` instead of `config/app.php`.
- Can I use SEOTools with Lumen?
- Yes, SEOTools supports Lumen, but facades won’t work. Access services via `app('seotools')` or inject the `SEOToolsServiceProvider` manually. It’s ideal for lightweight APIs or microservices needing SEO metadata.
- How do I set dynamic meta tags for blog posts?
- Use the `SEOMeta` facade to set dynamic titles and descriptions. For example, `SEOMeta::setTitle('My Post')->setDescription('Post content...')`. Override defaults in controllers or middleware for each route.
- Does SEOTools support JSON-LD structured data?
- Yes, use `JsonLd::setTitle()`, `JsonLd::setUrl()`, and `JsonLd::setType()` to define schemas like Article, Product, or Event. For multiple schemas, use `JsonLdMulti`. Validate output with Google’s Rich Results Test.
- Will SEOTools work with Inertia.js or Vue/React SPAs?
- Yes, meta tags auto-inject into `<head>` via Blade. For SPAs, pass meta data via props or use SSR hydration (e.g., Nuxt-like approach). Ensure your frontend framework supports dynamic `<head>` updates.
- How do I cache meta tags for performance?
- Use `SEOMeta::cache()` to store meta tags in memory or Redis. Clear cache when content changes. This reduces per-request generation overhead, critical for high-traffic pages or APIs.
- Can I customize OpenGraph or Twitter Cards for specific content types?
- Absolutely. Use `OpenGraph::setProperty()` or `TwitterCard::setSite()` to define custom properties. For example, set `article:published_time` for blog posts or `product:price` for e-commerce.
- Does SEOTools conflict with other Laravel SEO packages like Spatie SEO?
- No direct conflicts, but avoid mixing packages to prevent duplicate meta tags. SEOTools is lightweight and modular—choose it for its simplicity or Spatie for advanced features like sitemaps. Stick to one for consistency.
- How do I test SEO meta tag generation in CI/CD?
- Write unit tests for `SEOMeta`, `OpenGraph`, and `JsonLd` facades using Laravel’s testing helpers. Use tools like Scrapy or Puppeteer to crawl pages and validate rendered meta tags in integration tests.
- What Laravel versions does SEOTools support, and is it future-proof?
- SEOTools supports Laravel 5.8+. It’s actively maintained with backward-compatible updates, including Laravel 11+. Check the [GitHub releases](https://github.com/artesaos/seotools/releases) for version-specific notes.