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

{{ $stats['total_purchases'] }}

Total Purchases

£{{ number_format($stats['total_spent'], 2) }}

Total Spent

{{ $stats['pending_transactions'] }}

Pending Orders

{{ $stats['most_purchased_type']->type ?? 'None' }}

Favorite Category

Clear
@if($transactions->count() > 0)
@foreach($transactions as $transaction)
@switch($transaction->package->type) @case('vip') @break @case('money') @break @default @endswitch

{{ $transaction->package->name }}

{{ Str::limit($transaction->package->description, 60) }}

{{ ucfirst($transaction->status) }}
Amount £{{ number_format($transaction->amount, 2) }}
@if($transaction->server)
Server {{ $transaction->server->name }}
@endif
Payment Method {{ $transaction->payment_method_display }}
Date {{ $transaction->created_at->format('M d, Y H:i') }}
@if($transaction->transaction_id)
Transaction ID {{ Str::limit($transaction->transaction_id, 20) }}
@endif
View Details @if($transaction->status === 'completed') @endif
@endforeach
{{ $transactions->links() }}
@else

No purchases found

You haven't made any purchases yet or no transactions match your current filters.

Start Shopping
@endif
@endsection @push('scripts') @endpush