@php $endDate = now(); $weeklyBestSelling = getContent('weekly_selling_product.content', true); $weeklyBestSellingProducts = \App\Models\Product::approved() ->allActive() ->with('author') ->withCount(['orderItems as total_sold']) ->groupBy('products.id') ->orderBy('total_sold','desc') ->having('total_sold','>',0) ->limit(10) ->get(); @endphp

{{ __(@$weeklyBestSelling->data_values->title) }}

@lang('View All Items')
@foreach ($weeklyBestSellingProducts as $product) @endforeach