@extends('layouts.admin') @section('content')
View Statistics Add New Promotion @if(count($promotions) > 0) Name Applicable Roles Additional Days Start Date End Date Status Actions @foreach($promotions as $promotion)
{{ $promotion->name }}
@if($promotion->description)
{{ Str::limit($promotion->description, 50) }}
@endif @php $roles = $promotion->getApplicableRolesModels(); @endphp @if($roles->isEmpty()) All Custom Roles @else
@foreach($roles as $role) {{ $role->name }} @endforeach
@endif {{ $promotion->additional_days }} days {{ $promotion->start_date ? formatDate($promotion->start_date) : 'No limit' }} {{ $promotion->end_date ? formatDate($promotion->end_date) : 'No limit' }} @php $isExpired = $promotion->end_date && \Carbon\Carbon::now()->gt($promotion->end_date); @endphp @if($isExpired) Expired @elseif($promotion->is_active && $promotion->isCurrentlyActive()) Active @elseif($promotion->is_active) Scheduled @else Inactive @endif
@csrf @method('DELETE')
@endforeach
@else

No promotions found

Create your first promotion to get started.

@endif
@endsection