Student Payment

Student Payment List {{ $datas->count() }}
@php $i = 1; $total = 0; @endphp @foreach($datas as $item) @endforeach
SL COURSE USER DETAILS AMOUNT ORDER ID SENDER PHONE TRX ID METHOD STATUS DATE ACTION
{{ $i++ }}
{!! $item->course->name ?? '
—
' !!}
{{ $item->user->name ?? 'N/A' }} {{ $item->user->phone ?? ($item->user->email ?? '') }}
৳ {{ number_format($item->amount ?? 0, 2) }} {{ $item->order_id ?? 'N/A' }} {{ $item->phone_no ?? '—' }} @if ($item->bank_trx_id) {{ $item->bank_trx_id }} @else — @endif {{ $item->method ?? 'N/A' }} @if ($item->status == 1) Accepted @elseif ($item->status == 2) Rejected @else Pending @endif @php $rawDate = $item->date_time ?? $item->created_at; $formattedDate = null; if ($rawDate) { try { if ($rawDate instanceof \DateTimeInterface) { $formattedDate = $rawDate->format('d M Y, h:i A'); } elseif (is_numeric($rawDate)) { $ts = (int)$rawDate; if ($ts > 9999999999) { $ts = (int)($ts / 1000); } $formattedDate = \Carbon\Carbon::createFromTimestamp($ts)->format('d M Y, h:i A'); } else { $formattedDate = \Carbon\Carbon::parse($rawDate)->format('d M Y, h:i A'); } } catch (\Exception $e) { $formattedDate = $rawDate; } } @endphp {{ $formattedDate ?? '—' }}
@php $methodName = strtolower($item->method ?? ''); $isManualPayment = str_contains($methodName, 'manual') || in_array($methodName, ['bkash-manual', 'nagad-manual', 'rocket-manual']); @endphp @if ($isManualPayment) {{-- Status Update Form for Manual Payments --}}
@csrf @method('PUT') @if ($item->status != 1) @endif @if ($item->status != 2) @endif @if ($item->status != 0) @endif
@else Automated @endif {{-- Delete Form --}}
@csrf @method('DELETE')
Total {{ number_format($total ?? 0, 2) }} BDT