This content originally appeared on DEV Community and was authored by Nipe Rich
I’m working on a Laravel-based property website and exploring the best way to add schema markup for real estate listings. Schema helps Google understand property details such as price, location, and availability, and can make listings eligible for rich snippets.
As an example of a Laravel-powered real estate site, you can look at Danvast Property.
Simple Approach I Tried
In my project, I embedded JSON-LD directly into the property detail Blade template:
php
{
"@context": "https://schema.org",
"@type": "Offer",
"itemOffered": {
"@type": "Apartment",
"name": "{{ $property->title }}",
"address": {
"@type": "PostalAddress",
"streetAddress": "{{ $property->address }}",
"addressLocality": "{{ $property->city }}"
}
},
"priceCurrency": "USD",
"price": "{{ $property->price }}",
"availability": "https://schema.org/{{ $property->status == 'available' ? 'InStock' : 'SoldOut' }}",
"url": "{{ route('property.show', $property->slug) }}"
}
This method is simple: just use Blade variables to inject dynamic property data into the JSON-LD.
Discussion Points
- Is embedding schema directly into the Blade view considered best practice?
- Would it be better to create a reusable Blade component for schema markup?
- Has anyone here used a package or SEO helper to manage structured data at scale in Laravel projects?
This content originally appeared on DEV Community and was authored by Nipe Rich

Nipe Rich | Sciencx (2025-08-30T19:22:32+00:00) Best Way to Add Schema Markup for Real Estate in Laravel?. Retrieved from https://www.scien.cx/2025/08/30/best-way-to-add-schema-markup-for-real-estate-in-laravel-2/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.