- What is artesaos/seotools used for in Laravel?
- It is a presentation helper for rendering common SEO tags in the document head. It helps set page titles, meta descriptions, canonical URLs, Open Graph, Twitter Card, and JSON-LD structured data from Laravel code or Blade. It does not crawl sites, generate sitemaps, manage redirects, or audit SEO content. Treat it as tag plumbing rather than a full SEO platform.
- How do I install artesaos/seotools in Laravel?
- Install with composer require artesaos/seotools. On Laravel versions with package discovery the service provider and facade aliases are registered automatically; older apps may need manual provider and alias entries, and Laravel 11+ uses bootstrap/providers.php. Publish config/seotools.php if you want to change defaults, then render SEOTools::generate() in your layout head. No migrations or external credentials are required.
- Does SEOTools work with Laravel 11 and Laravel 12?
- The README states Laravel 5.8+ and Lumen support, and notes Laravel 11+ registration via bootstrap/providers.php. Package discovery should handle registration on modern Laravel, but you should confirm the package composer constraints and open issues for your exact PHP and Laravel pair. Do not assume a release supports every new Laravel major without checking.
- How do I set Open Graph and Twitter Card tags with SEOTools?
- Use the package opengraph() and twitter() builders alongside setTitle and setDescription, then render the generated string in the Blade head. Typical calls configure og:title, og:description, og:image, og:url, twitter:card, and twitter:site, but consult the README for exact method names. Keep image and canonical URLs absolute and environment-correct. Since the package does not validate payloads, verify og:type and required fields manually.
- Can SEOTools generate JSON-LD structured data?
- Yes, it includes JSON-LD helpers, including a multi JSON-LD builder, so you can add schema.org data to the rendered head. The package does not validate required schema fields or guarantee rich-result eligibility. You should define your own schema contracts and test the emitted JSON-LD. Invalid structured data can be worse than no structured data because it creates Search Console errors.
- Is SEOTools safe to use with Laravel Octane or queue workers?
- The underlying builders are stateful container singletons, so they assume one request lifecycle per process. In long-lived workers such as Octane, Swoole, or queue and scheduled jobs that render HTML, title, description, and JSON-LD fragments can leak between requests unless you explicitly reset them. Treat resetting SEO state as an integration requirement, not something the package guarantees. Test under concurrent or reused-worker conditions.
- Does SEOTools prevent XSS in titles and meta descriptions?
- No, it assembles values into raw HTML strings, so anything user-authored that reaches setTitle or setDescription is an XSS surface when output with unescaped Blade echoes. Escape or constrain inputs at your application boundary before passing them to the package. Do not treat the package as a sanitizer. Add explicit tests for untrusted titles, descriptions, and image URLs.
- What are alternatives to artesaos/seotools for Laravel SEO?
- Viable alternatives include hand-rolled Blade partials or components, framework-native head components, other structured-data packages, or a custom SEO presenter layer. SEOTools is commodity tag plumbing, so switching cost is relatively low if you keep the integration behind a narrow interface. Evaluate alternatives on validation, Octane safety, and maintenance activity rather than feature count. If you only need titles and basic metas, a small internal partial may be simpler.
- How should I test SEOTools output in a Laravel application?
- Render a route or view and assert the generated head string contains the expected title, canonical, Open Graph, Twitter, and JSON-LD tags. Because the package has no validation layer, add tests for required schema fields, absolute URLs, duplicate tags, and escaping of untrusted input. Include a test that resets state between simulated requests if you run Octane or long-lived workers. Keep assertions focused on your own SEO contracts, not the package internals.
- Is artesaos/seotools actively maintained and production-ready?
- It has a long release history and thousands of GitHub stars, which indicates real-world use, but maintenance signals are mixed and should be verified before adoption. Check current commit activity, release dates, PHP and Laravel support matrix, test coverage, and issue triage for the versions you run. Production readiness depends more on your own controls for escaping, validation, URL correctness, and worker state reset than on the package alone. For a narrow head-tag helper it can be production-ready; for an SEO platform it is not.