@extends('layouts.vendor') @section('title', 'Package Purchase History') @section('content')
{{-- Header --}}

Purchase History

View all your package purchases

Back to Packages
{{-- Purchases Table --}}
@forelse($purchases as $purchase) @empty @endforelse
Package Amount Payment Status Period Date
{{ $purchase->package->name }}
{{ $purchase->transaction_id }}
${{ number_format($purchase->amount, 2) }}
{{ ucfirst($purchase->payment_type) }}
@if($purchase->payment_method)
{{ ucfirst(str_replace('_', ' ', $purchase->payment_method)) }}
@endif
@php $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'completed' => 'bg-green-100 text-green-800', 'failed' => 'bg-red-100 text-red-800', 'expired' => 'bg-gray-100 text-gray-800', 'refunded' => 'bg-blue-100 text-blue-800', ]; @endphp {{ ucfirst($purchase->status) }}
@if($purchase->starts_at && $purchase->expires_at) {{ $purchase->starts_at->format('M d') }} - {{ $purchase->expires_at->format('M d, Y') }} @else - @endif
{{ $purchase->created_at->format('M d, Y') }}

No purchase history found

@if($purchases->hasPages())
{{ $purchases->links() }}
@endif
@endsection