Transactions
Here, you can see all the transactions available on Stizee.
@php
$totalTransactions = $trans->count();
$totalAmount = $trans->sum('amount');
$todayTransactions = $trans->where('created_at', '>=', now()->startOfDay())->count();
$todayAmount = $trans->where('created_at', '>=', now()->startOfDay())->sum('amount');
$successfulTransactions = $trans->where('status', 'success')->count();
$pendingTransactions = $trans->where('status', 'pending')->count();
@endphp
Total Transactions
{{ number_format($totalTransactions) }}
+{{ $todayTransactions }} today
Total Revenue
₦{{ number_format($totalAmount, 2) }}
₦{{ number_format($todayAmount, 2) }} today
Successful
{{ number_format($successfulTransactions) }}
{{ $totalTransactions > 0 ? round(($successfulTransactions / $totalTransactions) * 100, 1) : 0 }}% success rate
Pending
{{ number_format($pendingTransactions) }}
{{ $totalTransactions > 0 ? round(($pendingTransactions / $totalTransactions) * 100, 1) : 0 }}% pending
| User @if($currentSort === 'user_name') @endif | Type @if($currentSort === 'type') @endif | Tnx ID @if($currentSort === 'transaction_id') @endif | Amount @if($currentSort === 'amount') @endif | Status @if($currentSort === 'status') @endif | Date @if($currentSort === 'date') @endif |
|
|---|---|---|---|---|---|---|
| {{ $d->user_name ?? 'Unknown User' }} | @php $typeColors = [ 'deposit' => 'success', 'withdrawal' => 'danger', 'earning' => 'success', 'order' => 'primary', 'refund' => 'warning', 'subscription' => 'info' ]; $typeColor = $typeColors[strtolower($d->type ?? 'default')] ?? 'secondary'; @endphp {{ ucfirst($d->type ?? 'Unknown') }} | {{ $d->tnx_id ?? $d->id }} | ₦{{ number_format($d->amount ?? 0, 2) }} | @php $statusColors = [ 'success' => 'success', 'completed' => 'success', 'pending' => 'warning', 'failed' => 'danger', 'cancelled' => 'danger' ]; $statusColor = $statusColors[$d->status ?? 'pending'] ?? 'secondary'; @endphp {{ ucfirst($d->status ?? 'Pending') }} | {{ \Carbon\Carbon::parse($d->created_at)->format('M d, Y') }} {{ \Carbon\Carbon::parse($d->created_at)->format('h:i A') }} |