Please enter your login details below.
Please enter your your details to create a new account.
Please enter your email address to reset your password.
Please enter your email address to migrate your account.
public function tour()
export default PortaTourReviews; // Admin routes Route::get('/admin/reviews/pending', [AdminReviewController::class, 'pending']); Route::patch('/admin/reviews/id/approve', [AdminReviewController::class, 'approve']); Route::delete('/admin/reviews/id', [AdminReviewController::class, 'destroy']); Admin view filters unapproved reviews, can approve, delete, or reply. 5. SEO & Schema.org Markup Add to tour page: portatour reviews
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' ]; public function tour() export default PortaTourReviews
<div className="write-review"> <h3>Write your review</h3> <StarRating rating=newReview.rating onChange=(r) => setNewReview(...newReview, rating: r) /> <input placeholder="Review title" value=newReview.title onChange=e => setNewReview(...newReview, title: e.target.value) /> <textarea placeholder="Share your experience..." value=newReview.comment onChange=e => setNewReview(...newReview, comment: e.target.value) /> <button onClick=submitReview>Submit Review</button> </div> </div> ); ; // Admin routes Route::get('/admin/reviews/pending'
const submitReview = async () => await fetch( /api/tours/$tourId/reviews , method: 'POST', headers: 'Content-Type': 'application/json' , body: JSON.stringify(newReview) ); // refresh reviews ;
protected $casts = [ 'images' => 'array', 'replies' => 'array', 'is_verified_purchase' => 'boolean', 'is_approved' => 'boolean', ];