@extends('admin.layouts.app') @section('title', 'Coupons') @section('crumbs')Coupons@endsection @section('content')

{{ $coupons->total() }} coupons

+ New coupon
@forelse ($coupons as $c) @php $expired = $c->expires_at && $c->expires_at->isPast(); @endphp @empty @endforelse
CodeDiscountMin orderUsedExpiresStatusActions
{{ $c->code }} {{ $c->label }} {{ (float) $c->min_order > 0 ? '৳'.number_format($c->min_order) : '—' }} {{ $c->used }}{{ $c->usage_limit ? ' / '.$c->usage_limit : '' }} {{ $c->expires_at ? $c->expires_at->format('d M Y, h:i A') : 'Never' }} @if (! $c->is_active) Inactive @elseif ($expired) Expired @elseif ($c->usage_limit && $c->used >= $c->usage_limit) Limit reached @else Active @endif
Edit
@csrf @method('DELETE')
No coupons yet.
{{ $coupons->links('admin.partials.pagination') }}
@endsection