@php $page = 'withdrawals' @endphp @php function getBadgeClass($status) { switch ($status) { case 'processed': return 'success'; case 'declined': return 'danger'; default: return 'warning'; } } @endphp @extends('includes.layout') @section('content')

Withdrawal History

Balance

${{ number_format($user->balance, 2) }}

@forelse ($withdrawals as $item)
User:

{{ optional($item->user)->name ?? 'Deleted' }}


Withdrawal Type:

{{ $item->type == 'main_balance' ? 'Main Balance' : 'Referral Bonus' }}


Amount:

${{ number_format($item->amount, 2) }}


Charges:

${{ number_format($item->charges, 2) }}


Previous Balance:

${{ number_format($item->prev_balance, 2) }}


Current Balance:

${{ number_format($item->cur_balance, 2) }}


Payment Method :

{{ optional($item->user_wallet)->system_wallet->name ?? 'Unknown' }}


Status:

{{ Str::ucfirst($item->status) }}


Payment Date:

{{ $item->created_at->diffForHumans() }}

@empty

No Data Available at this Moment

@endforelse
{{ $withdrawals->render("pagination::bootstrap-4") }}
@endsection @push('scripts') @endpush