Products
Products
Manage your product catalogue and inventory
⚠ Low Stock 📦 Stock Levels Add Product
@php $allProducts = $products->getCollection(); $totalCount = $products->total(); $activeCount = $allProducts->where('status', 'active')->count(); $lowCount = $allProducts->filter(fn($p) => $p->isLowStock())->count(); $totalValue = $allProducts->sum(fn($p) => ($p->unit_price ?? 0) * ($p->stock_quantity ?? 0)); @endphp {{-- KPI strip --}}
Total Products
{{ $totalCount }}
In catalogue
Active
{{ $activeCount }}
Available for sale
Low Stock
{{ $lowCount }}
Need restocking
Stock Value
KSh {{ number_format($totalValue, 0) }}
At selling price
{{-- Filter --}}
Clear
{{-- Table --}}
@if($products->isEmpty())

📦

No products found

Add your first product

@else
@foreach($products as $product) @php $low = $product->isLowStock(); $pct = $product->low_stock_threshold > 0 ? min(100, round($product->stock_quantity / max($product->low_stock_threshold * 2, 1) * 100)) : 100; $barColor = $low ? '#dc2626' : ($pct < 60 ? '#B07010' : '#1A8A50'); @endphp @endforeach
Product Supplier Category Stock Cost Price Sell Price Status Actions
{{ $product->name }}
@if($product->sku)
{{ $product->sku }}
@endif @if($product->description)
{{ Str::limit($product->description, 50) }}
@endif
{{ $product->supplier?->name ?? '—' }} {{ $product->category ?? '—' }}
{{ $product->stock_quantity }}
@if($low) Low @endif
min {{ $product->low_stock_threshold }}
@if($product->cost_price)KSh {{ number_format($product->cost_price, 2) }}@else —@endif KSh {{ number_format($product->unit_price ?? 0, 2) }} {{ ucfirst($product->status) }}
Edit
@csrf @method('PATCH')
@csrf @method('DELETE')
@if($products->hasPages())
{{ $products->appends(request()->query())->links() }}
@endif @endif