@extends('layouts.app') @section('title', 'Dashboard') @section('content')
{{-- Header --}}

Dashboard

Good day, {{ explode(' ', auth()->user()->name)[0] }} ๐Ÿ‘‹

{{-- Stat Cards --}}
@php $stats = [ ['Wallet Balance', 'โ‚ฆ' . number_format($wallet->balance ?? 0, 2), 'text-emerald-400', 'M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z', 'bg-emerald-500/10'], ['Total Campaigns', auth()->user()->emailCampaigns()->count(), 'text-indigo-400', 'M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z', 'bg-indigo-500/10'], ['Emails Sent', number_format($totalSent), 'text-purple-400', 'M12 19l9 2-9-18-9 18 9-2zm0 0v-8', 'bg-purple-500/10'], ['Total Deposits', auth()->user()->deposits()->count(), 'text-pink-400', 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2', 'bg-pink-500/10'], ]; @endphp @foreach($stats as $i => $s)
{{ $s[1] }}
{{ $s[0] }}
@endforeach
{{-- Recent Campaigns --}} {{-- Recent Deposits --}}

Recent Deposits

View all โ†’
@if($deposits->isEmpty())

No deposits yet

Fund your wallet โ†’
@else
@foreach($deposits as $deposit)
โ‚ฆ{{ number_format($deposit->amount, 2) }}
Ref: {{ $deposit->reference }} ยท {{ $deposit->created_at->diffForHumans() }}
@php $dc = ['pending' => 'text-yellow-400 bg-yellow-500/10', 'approved' => 'text-emerald-400 bg-emerald-500/10', 'rejected' => 'text-red-400 bg-red-500/10']; @endphp {{ ucfirst($deposit->status) }}
@endforeach
@endif
@endsection