I've solved the problem using this:
DB::statement('set @balance := 0'); $entries = Voucher::with('chequeInfo') ->select('receipt_no', 'particular', DB::raw('@balance := @balance + (deposite - expense) as cBal')) ->where('receipt_type', 'LIKE', '%-fund') ->where('ladger_id', $id)->get();
If there is any better way then please post here.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us