@extends('layouts.app') @section('title', 'Dashboard') @section('content')

Dashboard

Overview of your campaign sending activity
+ New Campaign
Sent Today
{{ number_format($todaysSent) }}
Est. {{ $todaysCap > 0 ? round(($todaysSent / max(1, $todaysCap)) * 100) : 0 }}% of today's cap
Sent Yesterday
{{ number_format($yesterdaysSent) }}
Previous day's total
Last 7 Days
{{ number_format($weekSent) }}
Rolling 7-day total
All Time Sent
{{ number_format($allTimeSent) }}
Lifetime volume
Today's Cap
{{ number_format($todaysCap) }}
Remaining Today
{{ number_format(max(0, $todaysCap - $todaysSent)) }}
Left to send before cap
Active Campaigns
{{ $activeCampaigns->count() }}
Currently running
Pending Recipients
{{ number_format($totalPending) }}
Awaiting delivery

Last 7 Days Sending

@php $days = collect(); for ($i = 6; $i >= 0; $i--) { $date = \Carbon\Carbon::now()->subDays($i)->toDateString(); $stat = $dailyHistory->first(fn ($s) => $s->date == $date); $days->push([ 'label' => \Carbon\Carbon::parse($date)->format('D'), 'date' => $date, 'sent' => (int) ($stat?->sent_count ?? 0), 'isToday' => $date === now()->toDateString(), ]); } @endphp
@foreach ($days as $day)
{{ $day['sent'] > 0 ? number_format($day['sent']) : '' }}
{{ $day['label'] }}
@endforeach

Active Campaigns

@if ($activeCampaigns->isEmpty())
🚀
No campaigns are running right now.
@else @foreach ($activeCampaigns as $campaign) @php $total = $campaign->pending_count + $campaign->sent_count + $campaign->failed_count + $campaign->bounced_count; $pct = $total > 0 ? round(($campaign->sent_count / $total) * 100, 1) : 0; @endphp @endforeach
Campaign Status Pending Sent Progress
{{ $campaign->name }} ● Running {{ number_format($campaign->pending_count) }} {{ number_format($campaign->sent_count) }}
{{ $pct }}%
View
@endif
@endsection