@extends('layouts.app') @section('title', 'Vouchers') @section('content')

Vouchers

{{ $vouchers->total() }} voucher(s) in this view.

@csrf
@forelse ($vouchers as $voucher) @empty @endforelse
CodeBatchPlanPriceStatus Sold toRedeemedExpires
{{ $voucher->code }} {{ $voucher->batch?->name ?? '—' }} {{ $voucher->plan?->name ?? '—' }} {{ money($voucher->price) }} {{ $voucher->status }} {{ $voucher->customer_name ?: '—' }} @if ($voucher->customer_phone)
{{ $voucher->customer_phone }}
@endif
{{ $voucher->redeemed_at?->format('d M H:i') ?? '—' }} {{ $voucher->expires_at?->format('d M Y') ?? '—' }} @if ($voucher->status === 'available') @endif @if (! in_array($voucher->status, ['void', 'used']))
@csrf @method('DELETE')
@endif
@include('components.empty-state', ['icon' => '🎟', 'title' => 'No vouchers found', 'message' => 'Generate a batch to start selling access.', 'action' => ''])
@if ($vouchers->hasPages())
{{ $vouchers->links('partials.pagination') }}
@endif
@foreach ($vouchers as $voucher) @endforeach @endsection