@foreach($topEmiratesOrdersDetailsProducts as $product) @endforeach @php $total = 0 ; @endphp @foreach($topEmiratesOrdersDetails as $emirate_id=>$details) @foreach($topEmiratesOrdersDetailsProducts as $product) @endforeach @endforeach

تفاصيل الذبائح لكل امارة

المجموع{{$product->name}}
{{$emirates[$emirate_id]->name}} @php $sum = $details->sum('count') ; $total += $sum @endphp {{ $sum }} {{(isset($details[$product->product_id]))?$details[$product->product_id]->count:''}}
{{ $total }}