@extends('layouts.admin') @section('title', 'Withdrawals') @push('styles') @endpush @section('content') @php $withdrawalRequests = collect($withdrawalRequests ?? [])->map(function ($withdrawal) { $withdrawal['status'] = $withdrawal['status'] ?? 'Pending Withdrawal Review'; $withdrawal['amount_number'] = portalMoneyAmount($withdrawal['amount'] ?? 0); $withdrawal['key'] = adminWithdrawalKey($withdrawal); return $withdrawal; })->values(); $pendingWithdrawals = $withdrawalRequests->where('status', 'Pending Withdrawal Review'); $paidWithdrawals = $withdrawalRequests->where('status', 'Withdrawal Paid'); $rejectedWithdrawals = $withdrawalRequests->where('status', 'Withdrawal Rejected'); $totalWalletBalance = collect($wallets ?? [])->sum(fn ($wallet) => (float) ($wallet['balance'] ?? 0)); @endphp

Administration

User Withdrawal Requests

See who placed withdrawals, pay users, then approve or reject the request.

@if (session('status'))
{{ session('status') }}
@endif

Pending Withdrawals

{{ $pendingWithdrawals->count() }}

${{ number_format($pendingWithdrawals->sum('amount_number'), 2) }} waiting for payment

Paid Withdrawals

{{ $paidWithdrawals->count() }}

${{ number_format($paidWithdrawals->sum('amount_number'), 2) }} already paid

Rejected Withdrawals

{{ $rejectedWithdrawals->count() }}

Requests declined by admin

Total Wallet Balance

${{ number_format($totalWalletBalance, 2) }}

Across user wallets

All User Withdrawals

Pending, paid, and rejected withdrawal requests are displayed in one table.

@forelse ($withdrawalRequests as $withdrawal) @php $status = $withdrawal['status']; $badgeClass = match ($status) { 'Withdrawal Paid' => 'bg-emerald-50 text-emerald-700', 'Withdrawal Rejected' => 'bg-red-50 text-red-700', default => 'bg-amber-50 text-amber-700', }; @endphp @empty @endforelse
User Amount Method Account Details Status Submitted Reviewed Action
{{ $withdrawal['user_name'] ?? 'Not provided' }} {{ $withdrawal['user_email'] ?? 'Not provided' }} ${{ number_format($withdrawal['amount_number'], 2) }} {{ $withdrawal['withdrawal_method'] ?? 'Not selected' }} {{ $withdrawal['account_details'] ?? 'No account details provided' }} @if (! empty($withdrawal['note'])) User note: {{ $withdrawal['note'] }} @endif @if (! empty($withdrawal['admin_note'])) Admin note: {{ $withdrawal['admin_note'] }} @endif {{ $status }} {{ $withdrawal['submitted_at'] ?? '-' }} {{ $withdrawal['reviewed_at'] ?? '-' }} @if (! empty($withdrawal['reviewed_by'])) {{ $withdrawal['reviewed_by'] }} @endif
@csrf
No withdrawal request has been placed yet.
@endsection