/** * @author: lmkhang - skype * @date: 2016-02-05 * Get all amount of all user >= min pay */ public function getPaidAmount() { return \App\UserIncomeExpenditure::whereRaw('status = ? AND action = ? AND is_payment = ?', [1, 2, 1])->sum('original_amount'); }