@foreach($coupons as $coupon) {{ $coupon->id }}
{{ $coupon->title }}
{{ $coupon->code }}
@if($coupon->description) {{ Str::limit($coupon->description, 50) }} @endif
@if($coupon->discount_type === 'percentage') {{ $coupon->discount_value }}% @else ₹{{ $coupon->discount_value }} @endif
From: {{ $coupon->start_date->format('M d, Y') }}
To: {{ $coupon->end_date->format('M d, Y') }}
@if($coupon->end_date->isPast()) Expired @elseif($coupon->start_date->isFuture()) Not Started @else Active @endif
{{ $coupon->usages->count() ?? 0 }} used
@if($coupon->usage_limit)
of {{ $coupon->usage_limit }}
@if($coupon->usages->count() >= $coupon->usage_limit) Limit Reached @endif @else Unlimited @endif
{{ ucfirst($coupon->status) }} {{ $coupon->created_at->format('M d, Y') }} @include('admin.crud.action-dropdown', [ 'editUrl' => route('admin.coupons.edit', $coupon->id), 'deleteUrl' => route('admin.coupons.destroy', $coupon->id), 'redirectUrl' => route('admin.coupons.index') ]) @endforeach