@php
// Sales count - only count completed orders that contain this product
$salesCount = \App\Models\Order::where('cart_data', 'LIKE', '%"product_id":' . $product->id . '%')
->where('status', 'completed')
->count();
@endphp
0
Total Sales
People have purchased this item