@extends('layouts.admin') @section('page-title', 'Online Purchase History') @section('content')

Online Purchase History

Found {{ $purchases->total() }} records

Back to Packages

Online Purchases

@forelse($purchases as $index => $purchase) @empty @endforelse
# Vendor Package Gateway Amount Transaction ID Purchase Date Status
{{ $purchases->firstItem() + $index }}
{{ $purchase->vendor->name }}
{{ $purchase->vendor->email }}
{{ $purchase->package->name }} {{ $purchase->payment_gateway ?? '-' }} ${{ number_format($purchase->amount, 2) }} {{ $purchase->transaction_id ?? '-' }} {{ $purchase->created_at->format('d M Y H:i') }} @php $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'completed' => 'bg-green-100 text-green-800', 'failed' => 'bg-red-100 text-red-800', 'refunded' => 'bg-blue-100 text-blue-800', ]; @endphp {{ ucfirst($purchase->status) }}
No online purchases found
@if($purchases->hasPages())
{{ $purchases->links() }}
@endif
@endsection