@extends('layouts.app') @section('title', 'Transactions') @section('page-title', 'Transactions') @section('content')
@forelse($transactions as $tx) @php $isCredit = in_array($tx->type,['deposit','referral_bonus','refund']); $sc = $tx->status === 'completed' ? 'bg-tertiary/10 text-tertiary border-tertiary/30' : ($tx->status === 'pending' ? 'bg-[#fcd34d]/10 text-[#fcd34d] border-[#fcd34d]/30' : 'bg-error/10 text-error border-error/30'); @endphp @empty @endforelse
ID Type Description Amount Status
#{{ $tx->id }}
{{ $isCredit ? 'add_circle' : 'remove_circle' }} {{ str_replace('_',' ', $tx->type) }}
{{ $tx->description ?? '—' }} {{ $isCredit ? '+' : '-' }}${{ number_format($tx->amount, 4) }} {{ ucfirst($tx->status) }}
receipt_long No transactions yet
@if($transactions->hasPages())

{{ $transactions->firstItem() }}–{{ $transactions->lastItem() }} of {{ $transactions->total() }}

@if(!$transactions->onFirstPage()) ← Prev @endif @if($transactions->hasMorePages()) Next → @endif
@endif
@endsection