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

Schema Org Laravel Package

spatie/schema-org

Fluent PHP builder for the full Schema.org vocabulary. Create Schema.org types and properties via chainable methods and output valid JSON-LD/ld+json scripts for SEO. Auto-generated from Schema.org standards for complete coverage.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • SEO & Structured Data Strategy: Enables implementation of Schema.org markup (e.g., LocalBusiness, Product, Article) to improve search engine visibility, rich snippets, and voice search compatibility. Aligns with roadmap items for technical SEO enhancements or content monetization (e.g., e-commerce, blogs).
  • Build vs. Buy: Buy—avoids reinventing Schema.org compliance from scratch. Reduces dev effort for dynamic structured data generation (e.g., product pages, events, FAQs).
  • Use Cases:
    • E-commerce: Auto-generate Product, Offer, and AggregateRating for Google Shopping.
    • Local Businesses: Embed LocalBusiness, OpeningHours, and GeoCoordinates for maps/knowledge panels.
    • Content Platforms: Add Article, Breadcrumb, or FAQPage to blogs/news sites.
    • Events: Publish Event or MusicEvent with dates/locations for SERP prominence.
  • Multi-Entity Support: Critical for complex pages (e.g., a product that’s also a HotelRoom or Service).
  • Graph API: Useful for interconnected data (e.g., linking OrganizationPersonJobPosting).
  • Compliance & Maintenance: Automatically updates with Schema.org version changes (e.g., v29.3), reducing manual updates.

When to Consider This Package

  • Adopt if:

    • Your product relies on structured data for SEO (e.g., e-commerce, local listings, news).
    • You need dynamic Schema.org generation (e.g., per-product, per-event) without hardcoding JSON-LD.
    • Your team lacks dedicated SEO/structured data expertise but needs compliance.
    • You’re using Laravel/PHP and want a fluent, type-safe API over raw JSON-LD.
    • You require multi-typed entities (e.g., a Product that’s also a Service).
  • Look elsewhere if:

    • You’re using JavaScript/React (consider libraries like @jsonld/react or @schemaorg/jsonld).
    • Your needs are static (e.g., one-off Schema.org snippets)—hardcode JSON-LD instead.
    • You need real-time validation (use Google’s Rich Results Test alongside this).
    • Your stack is non-PHP (e.g., Python, Node.js).
    • You require custom Schema.org extensions not covered by the core vocabulary.

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us automate structured data for SEO without custom dev work. For example:

  • E-commerce: Auto-generate Product/Offer markup to boost Google Shopping listings.
  • Local SEO: Embed LocalBusiness data to dominate ‘near me’ searches.
  • Content: Add Article/FAQ schemas to improve click-through rates. It’s maintenance-free (updates with Schema.org) and scalable—ideal for our roadmap to expand into [target markets]."*

ROI: Reduced dev time, higher SERP visibility, and compliance with search engine guidelines.


For Engineering:

*"This is a fluent, zero-boilerplate way to generate Schema.org JSON-LD in PHP/Laravel. Key features:

  • Fluent API: Chain methods like $schema->product()->name()->price().
  • Graph Support: Link entities (e.g., OrganizationPerson).
  • Multi-Typed Entities: Handle edge cases like Product + HotelRoom.
  • Security: Escapes HTML in toScript() to prevent injection (fixed in v4.0.2).
  • Performance: Generated from Schema.org’s official JSON-LD spec—always up to date.

Trade-offs:

  • No runtime validation (validate output with Google’s Testing Tool).
  • Limited to Schema.org core (no custom extensions).

Recommendation: Use for dynamic pages (e.g., product/event templates). For static sites, hardcode JSON-LD."*


Example Pitch Email Snippet:

"Hi [Team], *To accelerate our [SEO/e-commerce/local] goals, I’m proposing we adopt spatie/schema-org to automate structured data. It’s a Laravel-native, battle-tested package that handles Schema.org markup fluently—saving dev time while ensuring compliance. For [use case], it would let us [specific benefit, e.g., ‘auto-generate Product schemas for all listings’] with minimal effort. Let’s discuss in the next standup—I’ll share a prototype for [specific page type]."

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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi