Business Analytics

Revenue and operational insights

Today's Orders

{{ $analytics['orders_today'] }}

Today's Revenue

₦{{ number_format($analytics['revenue_today'], 2) }}

Month Orders

{{ $analytics['orders_month'] }}

Avg Order Value

₦{{ number_format($analytics['AOV_month'] ?? 0, 2) }}

@php // Pull quick KPIs from InventoryStats $inv = \App\Models\InventoryStats::selectRaw(' COUNT(*) as tracked, SUM(on_hand) as on_hand, SUM(available) as available, SUM(total_sales_value) as sales_value, SUM(inventory_value) as inventory_value, AVG(velocity_7d) as avg_v7 ')->first(); @endphp
Inventory Tracked
{{ number_format($inv->tracked ?? 0) }}
On Hand (Units)
{{ number_format($inv->on_hand ?? 0) }}
Available (Units)
{{ number_format($inv->available ?? 0) }}
Avg Velocity (7d)
{{ number_format($inv->avg_v7 ?? 0, 2) }} /day
Inventory Value (Est.)
₦{{ number_format($inv->inventory_value ?? 0, 2) }}
Sales Value (Lifetime)
₦{{ number_format($inv->sales_value ?? 0, 2) }}
Inventory Availability
View per-location grid

Top Selling Dishes

@foreach($topDishes as $dish)
@php $imageUrl = $dish->image ? asset('storage/' . $dish->image) : asset('assets/placeholders/dish-placeholder.svg'); @endphp {{ $dish->name }}

{{ $dish->name }}

₦{{ number_format($dish->price, 2) }}

{{ $dish->order_count }}

orders

@endforeach

Recent Orders

View All
@foreach($recentOrders as $order)
#{{ $order->id }}

{{ $order->user->name ?? 'Guest' }}

{{ $order->created_at->diffForHumans() }}

₦{{ number_format($order->total, 2) }}

@endforeach

Customer Analytics

{{ $customerStats['total_customers'] }}

Total Customers

{{ $customerStats['new_customers_month'] }}

New This Month

₦{{ number_format($analytics['revenue_month'], 2) }}

Month Revenue

{{ number_format(($analytics['revenue_month'] / max($analytics['orders_month'], 1)), 2) }}%

Growth Rate

@if(isset($missingImages) && $missingImages->count())

Image Diagnostics

{{ $missingImages->count() }} missing

These dishes have no resolvable image URL. Ensure the file exists in public/storage/dishes or public/assets/images, or set an absolute URL in the image field.

@foreach($missingImages as $d) @endforeach
ID Name Image field
{{ $d->id }} {{ $d->name }} {{ $d->image ?: '—' }}

Accepted locations under public/: storage/dishes/, storage/, assets/dishes/, assets/images/, assets/dishes/originals/.

Tip: run php artisan storage:link if using storage-backed images.

@endif