return $this->belongsTo(Tour::class);
public function markHelpful($userId)
<script type="application/ld+json">
public function user()
"@context": "https://schema.org", "@type": "Product", "name": "Paris Walking Tour", "aggregateRating": "@type": "AggregateRating", "ratingValue": "4.8", "reviewCount": "127" , "review": [ "@type": "Review", "author": "John Doe", "datePublished": "2025-03-10", "reviewRating": "@type": "Rating", "ratingValue": "5" , "reviewBody": "Amazing guide!" ] portatour reviews
</script> ✅ Verified purchase only (via booking ID) ✅ Star rating (1–5) + title + comment ✅ Image upload (max 5) ✅ Helpful button ✅ Admin approval workflow ✅ Average rating & breakdown ✅ Sort by newest / highest rated ✅ SEO structured data public function markHelpful($userId) <
const submitReview = async () => await fetch( /api/tours/$tourId/reviews , method: 'POST', headers: 'Content-Type': 'application/json' , body: JSON.stringify(newReview) ); // refresh reviews ; public function user() "@context": "https://schema.org"