@foreach($product->subProducts as $subProduct) @endforeach @foreach($product->subProducts as $productDetail) @php $quantity = $data[$productDetail->id]->quantity??0 ; $price = $data[$productDetail->id]->price??0 ; $discount = $data[$productDetail->id]->discount??0 ; $total = $price - $discount ; @endphp @endforeach

{{$product->name}}

{{__('back.weight')}}
{{$subProduct->data['weight']}}{{__('back.kg')}}
{{__('back.count')}}
{{__('back.total')}}
{{__('back.totalDiscount')}}
{{__('back.totalAfterDiscount')}}
{{$quantity}}
{{number_format($price)}}
{{number_format($discount)}}
{{number_format($total)}}