Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Seo Laravel Package

ralphjsmit/laravel-seo

Out-of-the-box SEO for Laravel models: automatically generates title, meta, OpenGraph, Twitter, structured data, robots, alternates and favicon tags. Store per-model SEO or derive it dynamically, then render everything with a simple seo()->for($model) call.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • SEO as a First-Class Feature: Accelerates development of SEO-optimized content by embedding SEO logic directly into models (e.g., Post, Page) without manual tag management. Reduces technical debt for teams prioritizing organic growth.
  • Content Strategy Roadmap: Enables dynamic SEO data (e.g., auto-generated titles from URLs, structured data for articles/FAQs) to align with editorial workflows. Supports multilingual sites via AlternateTag and locale handling.
  • Build vs. Buy: Eliminates need to build custom SEO middleware or rely on fragmented solutions (e.g., separate packages for OpenGraph/Twitter cards). MIT license and Spatie-like simplicity favor adoption over reinvention.
  • Use Cases:
    • Content-Heavy Apps: Blogs, news sites, or e-commerce where metadata consistency is critical.
    • Multilingual Sites: Automatic hreflang tags and locale-based SEO data.
    • Structured Data Needs: JSON-LD for articles, breadcrumbs, or FAQs without manual JSON-LD generation.
    • Legacy SEO Overhauls: Retrofitting existing Laravel apps with standardized SEO practices.

When to Consider This Package

  • Adopt When:

    • Your Laravel app requires consistent, scalable SEO across routes/models (e.g., 50+ pages).
    • You need dynamic SEO data (e.g., titles/descriptions pulled from model fields) without manual updates.
    • Your team lacks SEO expertise but wants out-of-the-box compliance (OpenGraph, Twitter Cards, structured data).
    • You’re building a content platform (CMS, blog, or documentation site) where SEO is a core feature.
    • You prioritize developer velocity over granular SEO customization (e.g., per-page robots tags).
  • Look Elsewhere If:

    • You need headless SEO control (e.g., API-driven SEO where frontend frameworks manage tags).
    • Your app uses non-Laravel backends or requires SEO in static sites (e.g., Next.js, Hugo).
    • You need advanced A/B testing for meta tags (this package lacks built-in experimentation tools).
    • Your SEO requirements are highly niche (e.g., custom schema types not supported by the package’s SchemaCollection).
    • You’re already using a dedicated SEO platform (e.g., Yoast, SEMrush API) that integrates with Laravel.

How to Pitch It (Stakeholders)

For Executives:

"This package lets us automate 80% of our SEO work—from meta tags to structured data—without hiring specialists. For example, a blog post’s title, OpenGraph image, and Twitter Card will update automatically when content changes, saving dev time and improving search rankings. It’s like having a built-in SEO team for our Laravel app, with minimal setup. The cost? Zero—it’s open-source and maintained. The ROI? Faster launches, better organic traffic, and happier marketers who don’t have to chase devs for tag fixes."

Key Metrics to Track:

  • Reduction in time spent on manual SEO tagging (e.g., from 2 hours/page → 5 minutes).
  • Increase in fully indexed pages (via robots tags and sitemap integration).
  • Decline in SEO-related bugs (e.g., missing OpenGraph tags).

For Engineering:

*"This is Spatie’s media library, but for SEO—intuitive, database-backed, and opinionated in the right ways. Here’s why it’s a no-brainer:

  • Zero Boilerplate: Add use HasSEO to a model, and it auto-generates SEO tags. No more copying <meta> tags across Blade files.
  • Dynamic Data: Pull SEO fields from your model (e.g., title, excerpt) without storing duplicates. Example:
    public function getDynamicSEOData(): SEOData {
        return new SEOData(
            title: $this->title,
            image: $this->featuredImage->path,
        );
    }
    
  • Structured Data Made Easy: Generate JSON-LD for articles, FAQs, or breadcrumbs without writing raw JSON. Example:
    $seoData->schema = new SchemaCollection([
        new ArticleSchema($this->title, $this->content, $this->author),
    ]);
    
  • Config-Driven: Centralize defaults (e.g., site name, robots rules) in config/seo.php. Override per-page as needed.
  • Future-Proof: Supports multilingual sites, canonical tags, and even Inertia.js (via inertia title attribute).

Trade-offs:

  • Less control than manual tagging (but that’s the point—reduce edge cases).
  • Requires publishing migrations/config (standard Laravel pattern).

Migration Path:

  1. Pilot: Roll out to 1–2 content-heavy routes (e.g., blog posts).
  2. Expand: Add HasSEO to core models (e.g., Product, Page).
  3. Optimize: Use getDynamicSEOData() to sync SEO with model fields.

Alternatives Considered:

  • Manual Blade Tags: Error-prone and unscalable.
  • Separate Packages: Fragmented (e.g., one for OpenGraph, another for Twitter Cards).
  • Custom Solution: Would take 2–3x longer to build and maintain.

Ask: ‘Can we test this on our blog for a month and measure the impact on indexing?’"*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport