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.
LocalBusiness, Product, Article) to improve search visibility, rich snippets, and voice search compatibility. Directly supports Google’s structured data requirements without manual JSON-LD/HTML microdata coding.Organization, Event, FAQPage) for high-impact pages (homepage, product listings, blog).SoftwareApplication, MedicalEntity) for vertical-specific use cases (e.g., SaaS, healthcare).Product, Offer, AggregateRating for listings.LocalBusiness, GeoCoordinates, OpeningHours for Google Maps integration.Article, Breadcrumb, HowTo for enhanced SERP features.Event schemas with startDate, location, attendee data.<script> tags in v4.0.2).Adopt When:
Product that’s also a HotelRoom).Organization to Product).priceCurrency matches price type).Look Elsewhere If:
schema-dts (TypeScript).json-ld (Node.js).health or auto extensions). Check for:
@type extensions.*"This package lets us automate structured data markup—a critical lever for SEO and digital assistant compatibility—without hiring specialized engineers. By integrating spatie/schema-org, we can:
*"This is a batteries-included Schema.org builder for PHP/Laravel:
$schema->product()->name()->price() for readability.Organization → Product → Offer) without manual @id juggling.toScript() (fixes XSS risks in v4.0.2).*"This tool lets us tag content for search engines without touching code. For example:
Article schemas to highlight authors, publish dates, and reading times.Event cards with RSVP links and locations.name, price), and the system outputs valid JSON-LD—no JSON syntax errors. Ask your PM to demo the fluent builder!"*How can I help you explore Laravel packages today?