@extends('admin.layouts.app') @section('title', 'Dashboard') @section('crumbs')Dashboard@endsection @section('content')
๐Ÿงพ
{{ number_format($stats['today_orders']) }}
Today's orders
โณ
{{ number_format($stats['pending']) }}
Pending orders
๐Ÿ›๏ธ
{{ number_format($stats['products']) }}
Products
๐Ÿ“‰
{{ number_format($stats['low_stock']) }}
Low stock (<10)
โœ‰๏ธ
{{ number_format($stats['unread']) }}
Unread messages

Orders โ€” last 7 days

Total {{ $chart->sum('count') }}
@php $max = max(1, $chart->max('count')); $w = 700; $h = 220; $pad = 30; $slot = ($w - $pad) / 7; $barW = $slot * 0.55; @endphp @foreach ([0, 0.5, 1] as $g) @php $y = 20 + ($h - 20) * (1 - $g); @endphp {{ round($max * $g) }} @endforeach @foreach ($chart as $i => $d) @php $bh = ($h - 20) * $d['count'] / $max; $x = $pad + $slot * $i + ($slot - $barW) / 2; $y = $h - $bh; @endphp {{ $d['date'] }}: {{ $d['count'] }} orders {{ $d['count'] }} {{ $d['label'] }} {{ $d['date'] }} @endforeach

๐Ÿ”ฅ Running campaigns

All
    @forelse ($campaigns as $c)
  • {{ $c->icon ?: '๐Ÿ”ฅ' }}
    {{ $c->products_count }} products ยท ends {{ $c->end_at->diffForHumans() }}
    Live
  • @empty
  • No campaign running now.
  • @endforelse

๐Ÿ“‰ Low stock

All
    @forelse ($lowStock as $p)
  • @if ($p->image)@else{{ $p->icon ?: '๐Ÿ“ฆ' }}@endif
    {{ $p->category?->name }}
    {{ $p->stock }} left
  • @empty
  • All products are well stocked ๐Ÿ‘
  • @endforelse
@endsection