@extends('admin::layouts.master') @section('title', 'Dashboard') @section('content')

Dashboard

Overview of your store performance

Revenue

€{{ number_format($stats['revenue'], 2) }}

{{ $stats['orders'] }} total orders

Orders

{{ $stats['orders'] }}

{{ $stats['delivered_orders'] }} delivered

Products

{{ $stats['products'] }}

{{ $stats['categories'] }} categories

Customers

{{ $stats['users'] }}

{{ $stats['pending_orders'] }} pending orders

Revenue (Last 6 Months)

@php $maxRev = max(array_column($stats['revenue_by_month'], 'revenue')) ?: 1; @endphp
@foreach($stats['revenue_by_month'] as $month) @php $pct = ($month['revenue'] / $maxRev) * 100; @endphp
€{{ number_format($month['revenue']) }}
{{ $month['month'] }}
@endforeach

Order Status

@php $colors = ['pending' => '#f59e0b', 'confirmed' => '#3b82f6', 'processing' => '#8b5cf6', 'shipped' => '#06b6d4', 'delivered' => '#10b981', 'cancelled' => '#ef4444']; $total = array_sum($stats['status_counts']) ?: 1; @endphp
@foreach($stats['status_counts'] as $status => $count) @if($count > 0) @php $pct = round($count / $total * 100); @endphp
{{ $status }} {{ $count }} ({{ $pct }}%)
@endif @endforeach

Recent Orders

View All
@forelse($stats['recent_orders'] as $order) @empty @endforelse
Order Items Total Status Date
{{ $order->order_number }} {{ $order->orderItems->count() }} items €{{ number_format($order->total, 2) }} {{ ucfirst($order->status) }} {{ $order->created_at->format('d.m.Y H:i') }}
No orders yet.

Low Stock Products

@forelse($stats['low_stock_products'] as $product)

{{ $product->name }}

{{ $product->stock_quantity }} in stock

Restock
@empty

All products are well stocked.

@endforelse

{{ $stats['payment_methods'] }}

Payment Methods

{{ $stats['save_the_food'] }}

Save The Food

{{ $stats['coupons'] }}

Coupons

{{ $stats['delivery_zones'] }}

Delivery Zones

@endsection