@php // Demo dashboard — numbers are fake (User count is real). Sparkline // points are SVG viewBox 0..100 wide, 0..30 tall (top→bottom). $stats = [ [ 'key' => 'users', 'icon' => 'users', 'label' => __('dashboard::dashboard.home.stats.users'), 'value' => number_format(\App\Models\User::count()), 'delta' => '+12.4%', 'up' => true, 'spark' => '0,24 10,22 20,20 30,18 40,15 50,12 60,14 70,10 80,8 90,6 100,4', ], [ 'key' => 'revenue', 'icon' => 'banknotes', 'label' => __('dashboard::dashboard.home.stats.revenue'), 'value' => '$48,392', 'delta' => '+8.1%', 'up' => true, 'spark' => '0,22 10,18 20,20 30,12 40,15 50,8 60,10 70,6 80,8 90,4 100,5', ], [ 'key' => 'orders', 'icon' => 'shopping-bag', 'label' => __('dashboard::dashboard.home.stats.orders'), 'value' => number_format(1284), 'delta' => '-2.3%', 'up' => false, 'spark' => '0,8 10,10 20,7 30,12 40,9 50,14 60,11 70,16 80,13 90,18 100,15', ], [ 'key' => 'sessions', 'icon' => 'bolt', 'label' => __('dashboard::dashboard.home.stats.sessions'), 'value' => number_format(342), 'delta' => '+24%', 'up' => true, 'spark' => '0,20 10,16 20,18 30,10 40,12 50,6 60,8 70,4 80,6 90,2 100,3', ], ]; $activity = [ ['icon' => 'user-plus', 'message' => __('dashboard::dashboard.home.activity.events.new_user', ['name' => 'Sara M.']), 'time' => __('dashboard::dashboard.home.activity.time.minutes_ago', ['count' => 2])], ['icon' => 'check-circle', 'message' => __('dashboard::dashboard.home.activity.events.order_paid', ['order' => '1248']), 'time' => __('dashboard::dashboard.home.activity.time.minutes_ago', ['count' => 12])], ['icon' => 'shield-exclamation', 'message' => __('dashboard::dashboard.home.activity.events.failed_login', ['ip' => '102.41.8.21']), 'time' => __('dashboard::dashboard.home.activity.time.hours_ago', ['count' => 1])], ['icon' => 'cog-6-tooth', 'message' => __('dashboard::dashboard.home.activity.events.settings_updated'), 'time' => __('dashboard::dashboard.home.activity.time.hours_ago', ['count' => 3])], ['icon' => 'arrow-uturn-left', 'message' => __('dashboard::dashboard.home.activity.events.payment_refunded', ['order' => '1196']), 'time' => __('dashboard::dashboard.home.activity.time.yesterday')], ]; @endphp
{{-- Heading --}}

{{ __('dashboard::dashboard.home.welcome', ['name' => auth()->user()?->getDisplayName() ?? '']) }}

{{ __('dashboard::dashboard.home.subtitle') }}

{{-- KPI grid --}}
@foreach ($stats as $stat)
{{ $stat['delta'] }}

{{ $stat['label'] }}

{{ $stat['value'] }}

{{ __('dashboard::dashboard.home.stats.vs_last_week') }}

@endforeach
{{-- Activity feed --}}

{{ __('dashboard::dashboard.home.activity.title') }}

{{ __('dashboard::dashboard.home.activity.view_all') }}