@foreach ($enrollments as $enrollment)
{{ $enrollment->course->title }}
ID: {{ $enrollment->transaction->invoice_no ?? 'N/A' }}
|
{{ $enrollment->transaction->transaction_id ?? 'N/A' }}
{{ $enrollment->created_at->format('M d, Y') }}
|
@php
$paymentColors = [
'pending' => 'bg-yellow-100 text-yellow-800',
'paid' => 'bg-green-100 text-green-800',
'cancelled' => 'bg-red-100 text-red-800',
'failed' => 'bg-red-200 text-red-900',
'refunded' => 'bg-blue-100 text-blue-800',
];
$status = $enrollment->transaction->payment_status ?? 'free';
if ($status === 'free') {
$paymentColors['free'] = 'bg-red-100 text-red-800';
}
@endphp
{{ $status === 'free' ? 'Free' : ucfirst($status) }}
|
৳{{ number_format($enrollment->transaction->final_amount ?? 0, 2) }}
|
{{ $enrollment->note ?? '-' }}
|
@if ($enrollment->transaction)
@else
N/A
@endif
|
@endforeach