@extends('layouts.admin') @section('title', 'Dashboard — JAM Admin') @section('page-title', 'Dashboard') @section('content')

Welcome back, {{ auth('admin')->user()->name }}

Here's what's happening with JAM Members Club.

{{-- Stats cards --}}
@php $totalMembers = \App\Models\User::count(); $activeMembers = \App\Models\User::where('status', 'active')->count(); $totalPoints = \App\Models\PointsTransaction::where('type', 'credit')->sum('amount'); $newThisWeek = \App\Models\User::where('created_at', '>=', now()->subDays(7))->count(); @endphp

Total Members

{{ number_format($totalMembers) }}

{{ $activeMembers }} active

Points Issued

{{ number_format($totalPoints) }}

All time

New This Week

{{ $newThisWeek }}

Registrations

Tier Breakdown

@php $tiers = \App\Models\Tier::withCount(['members'])->orderBy('display_order')->get(); @endphp
@foreach($tiers as $tier)
{{ $tier->name }} {{ $tier->members_count }}
@endforeach
{{-- Recent members --}}

Recent Members

View all →
@foreach(\App\Models\User::with('currentTier')->latest()->take(5)->get() as $user)
{{ strtoupper(substr($user->first_name, 0, 1)) }}

{{ $user->full_name }}

{{ $user->email }}

{{ number_format($user->points_balance) }} pts

{{ $user->currentTier?->tier?->name ?? 'Invited' }}

{{ ucfirst($user->status) }}
@endforeach @if(\App\Models\User::count() === 0)
No members yet.
@endif
@endsection