Portatour Reviews -
$request->validate([ 'rating' => 'required // GET /api/tours/tourId/reviews public function index($tourId)
// POST /api/tours/tourId/reviews public function store(Request $request, $tourId) portatour reviews
protected $casts = [ 'images' => 'array', 'replies' => 'array', 'is_verified_purchase' => 'boolean', 'is_approved' => 'boolean', ]; validate([ 'rating' =>
const submitReview = async () => await fetch( /api/tours/$tourId/reviews , method: 'POST', headers: 'Content-Type': 'application/json' , body: JSON.stringify(newReview) ); // refresh reviews ; const submitReview = async () =>
"@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!" ]
protected $table = 'portatour_reviews'; protected $fillable = [ 'tour_id', 'user_id', 'booking_id', 'rating', 'title', 'comment', 'images', 'replies', 'is_verified_purchase', 'is_approved', 'helpful_count', 'reported_count' ];
return $this->belongsTo(Tour::class);