Here is the eloquent query of Laravel I gave that in below.
Actually, I ignore all bill_amount
. I want to take only one bill_amount
per order_id
@php
$total=App\Billing::where('order_id','!=','order_id')->where('buyer_id',Auth::use
r()->buyer_id)->sum('bill_amount');
$pay=App\Billing::where('buyer_id',Auth::user()->buyer_id)->sum('payment_amount');
$due=$total-$pay;
@endphp
Here is the database table red mark I want to get this value
My Answer:
>sum('bill_amount');
Rate this post
5 of 5 based on 9668 votesComments