@php Theme::asset()->usePath()->add('jquery-bar-rating-css', 'plugins/jquery-bar-rating/css-stars.css'); Theme::asset()->container('footer')->usePath()->add('jquery-bar-rating-js', 'plugins/jquery-bar-rating/jquery.barrating.min.js'); Theme::asset()->container('footer')->usePath()->add('review-js', 'js/review.js'); @endphp @if(HotelHelper::isReviewEnabled()) @php $canReview = false; if ($isLoggedIn = auth('customer')->check()) { $hasBooked = auth('customer')->user()->hasBooked($model); $hasReviewed = auth('customer')->user()->hasReviewed($model); $canReview = $hasBooked && ! $hasReviewed; } @endphp

{{ __('Write a review') }}

@csrf
@if (! $isLoggedIn)

{{ __('Please log in to write review!') }}

@else @if (! $hasBooked)

{{ __('You need book this room to write a review!') }}

@elseif ($hasReviewed)

{{ __('You have written a review for this room!') }}

@endif @endif
@if($model->reviews_count)

{{ __(':count Review(s)', ['count' => $model->approved_review_count]) }}

@include(Theme::getThemeNamespace('views.hotel.partials.review-star'), ['avgStar' => $model->reviews_avg_star, 'count' => $model->reviews_count])
@endif
$model->approved_review_count]) data-url="{{ route('customer.ajax.review.index', $model->slug) }}?">
@endif