id)
->where('user_id', '!=', $listing->user_id)->where('type', 'beauty')->where('reply_id', NULL)
->count();
$total_ratings = App\Models\Review::where('listing_id', $listing->id)
->where('user_id', '!=', $listing->user_id)->where('type', 'beauty')->where('reply_id', NULL)
->sum('rating');
$average_rating = $reviews_count > 0 ? $total_ratings / $reviews_count : 0;
?>
()
id, 'BeautyListing') === 'Open'): ?>