@extends('layouts.admin') @section('title', 'Dashboard') @section('content') {{-- Stat Cards --}}
{{ number_format($stats['total_users']) }}
Total Users
{{ $stats['new_users_today'] }} today
{{ number_format($stats['total_points_issued']) }}
Points Issued
{{ $stats['today_transactions'] }} txns today
GH₵{{ number_format($stats['pending_amount'],2) }}
Pending Withdrawals
{{ $stats['pending_withdrawals'] }} requests
{{ $stats['fraud_alerts'] }}
Fraud Alerts Today
{{ $stats['banned_users'] }} banned
{{-- Second Row Stats --}}
{{ number_format($stats['active_users']) }}
Active Users
GH₵{{ number_format($stats['total_withdrawn'],2) }}
Total Paid Out
{{ number_format($stats['pending_tasks']) }}
Pending Task Proofs
{{-- Charts + Leaderboard --}}
{{-- Charts --}}

User Registrations (30 Days)

Points Earned (30 Days)

{{-- Right Panel --}}
{{-- Level Distribution --}}

User Levels

{{-- Quick Actions --}}
{{-- Pending Withdrawals --}} @if($recentWithdrawals->isNotEmpty())

Pending Withdrawals

View All
@foreach($recentWithdrawals as $w) @endforeach
UserAmountMethodAccountDateActions
{{ $w->user->name }}
{{ $w->user->email }}
GH₵{{ number_format($w->net_amount,2) }}
{{ number_format($w->points_deducted) }} pts
{{ strtoupper($w->method) }} {{ $w->account_name }}
{{ $w->account_number }}
{{ $w->created_at->diffForHumans() }}
@csrf
@csrf
@endif {{-- Recent Users + Fraud --}}

New Users

View All
@foreach($recentUsers as $u) @endforeach
UserPointsLevelJoined
{{ $u->name }}
{{ $u->email }}
{{ number_format($u->points) }} {{ $u->level }} {{ $u->created_at->diffForHumans() }}

Recent Fraud Alerts

View All
@if($recentFraud->isEmpty())

No fraud detected recently.
@else
@foreach($recentFraud as $f) @endforeach
TypeUserActionTime
{{ str_replace('_',' ',strtoupper($f->type)) }} {{ $f->user?->name ?? 'Unknown' }}
{{ $f->ip_address }}
{{ $f->action_taken }} {{ $f->created_at->diffForHumans() }}
@endif
@endsection @push('scripts') @endpush