php - I want to sum bill_amount column where order_id is not same . Actually I want to get due amount
one text
Solution:
$bill=App\Billing::distinct('bill_amount')->where('order_id','!=','order_id')->where('buyer_id',Auth::user()->buyer_id)->sum('bill_amount')
Source