@php $total=0; $due=0; @endphp @foreach($customer_payment as $customer_p) @endforeach
Date Customer Name transaction_type payment_type due amount
{{$customer_p->date}} {{$customer_info->customer_name}} {{$customer_p->transaction_type}} {{$customer_p->payment_type}} {{$customer_p->due}} @php $due=$due + $customer_p->due; @endphp {{$customer_p->amount}} @php $total= $total + $customer_p->amount; @endphp
Total @php echo $due; @endphp @php echo $total; @endphp