@extends('layouts.admin') @section('title', __('Dashboard')) @section('page-title', __('Dashboard')) @section('content')
@php $rangeLabel = __('Last 7 Days'); if (($range ?? '7d') === '30d') { $rangeLabel = __('Last 30 Days'); } elseif (($range ?? '') === 'custom') { $rangeLabel = __('Custom Range'); } @endphp

{{ __('Total User') }}

{{ number_format($usersCount ?? 0) }}

{{ $rangeLabel }} 0.0%

{{ __('Subscribers') }}

{{ number_format($subscribersCount ?? 0) }}

{{ $rangeLabel }} 0.0%

{{ __('Earnings') }}

${{ number_format((float) ($earnings ?? 0), 2) }}

{{ $rangeLabel }} 0.0%

{{ __('Campaigns Created') }}

{{ number_format($campaignsCreated ?? 0) }}

{{ $rangeLabel }} 0.0%

{{ __('Campaigns Ran') }}

{{ number_format($campaignsRan ?? 0) }}

{{ $rangeLabel }} 0.0%

{{ __('Email Lists Created') }}

{{ number_format($listsCreated ?? 0) }}

{{ $rangeLabel }} 0.0%

{{ __('Subscription Cancelled') }}

{{ number_format($subscriptionsCancelled ?? 0) }}

{{ $rangeLabel }} 0.0%

{{ __('Templates Created') }}

{{ number_format($templatesCreated ?? 0) }}

{{ $rangeLabel }} 0.0%
@php $showAllUrl = route('admin.activities.index', request()->only(['range', 'from', 'to'])); @endphp

{{ __('Recent Activity') }}

{{ __('Show all activities') }}
@forelse(($recentActivity ?? []) as $item)

{{ $item['label'] ?? '' }}

{{ $item['detail'] ?? '' }}

{{ \Carbon\Carbon::parse($item['at'])->diffForHumans() }}

@empty

{{ __('No recent activity') }}

@endforelse
@if(empty($worldVisitors ?? []))

{{ __('No visitor data yet') }}

@endif
@endsection @push('scripts') @endpush