No promotions yet
Create promo codes and special offers
@foreach($promotions as $promo)
@php
$isActive = $promo->is_active
&& now()->between($promo->valid_from, $promo->valid_to);
$isExpired = now()->gt($promo->valid_to);
@endphp
{{ $promo->name }}
@if($promo->code)
{{ $promo->code }}
@endif
@if($isExpired)
Expired
@elseif(!$promo->is_active)
Inactive
@else
Active
@endif
{{-- Discount --}}
@if($promo->discount_type === 'percentage')
{{ $promo->discount_value }}% off
@elseif($promo->discount_type === 'fixed')
${{ number_format($promo->discount_value, 2) }} off
@else
Override: ${{ number_format($promo->discount_value, 2) }}
@endif
{{-- Validity --}}
{{ $promo->valid_from->format('d M') }}
–
{{ $promo->valid_to->format('d M Y') }}
@if($promo->min_stay_nights)
Min {{ $promo->min_stay_nights }} nights
@endif
{{-- Usage --}}
@if($promo->max_uses)
{{ $promo->use_count ?? 0 }} / {{ $promo->max_uses }} used
@else
{{ $promo->use_count ?? 0 }} used
@endif
{{-- Applies to --}}
@if($promo->roomCategory)
{{ $promo->roomCategory->name }} only
@endif
@if($promo->ratePlan)
{{ $promo->ratePlan->code }} plan only
@endif
@if($promo->description)
{{ $promo->description }}
@endif
@endforeach