{{-- ─── Filters ─────────────────────────────────────────────────────────────── --}}
@if(request()->hasAny(['type','status'])) Clear filters @endif
{{-- ─── Table ───────────────────────────────────────────────────────────────── --}} @if($transactions->isEmpty()) @else
@foreach($transactions as $tx) @php $txStatus = $tx->status instanceof \BackedEnum ? $tx->status->value : (string) $tx->status; $txType = $tx->type instanceof \BackedEnum ? $tx->type->value : (string) $tx->type; $isCredit = in_array($txType, ['deposit','roi','bonus','referral_bonus','capital_return','stock_sale','withdrawal_reversal']); $statusColors = ['completed'=>'emerald','pending'=>'amber','failed'=>'red','cancelled'=>'red','active'=>'blue']; $statusColor = $statusColors[$txStatus] ?? 'gray'; $label = str_replace('_', ' ', ucfirst($txType)); @endphp @endforeach
Type Amount Status

{{ $label }}

{{ $isCredit ? '+' : '-' }}${{ number_format($tx->amount, 2) }} {{ $txStatus }}
{{ $transactions->withQueryString()->links() }}
@endif