@php $seller = auth()->guard('seller')->user(); $sellerOrderCount = App\Models\Order::sellerOrder()->placed()->physicalOrder()->whereHas('orderDetails', function($q) use ($seller){ $q->whereHas('product', function($query) use ($seller){ $query->where('seller_id', $seller->id); }); })->count(); @endphp