/** * Get total referral fee by all selected solution * $coll, ID of each solutions */ public function totalRefferalFee($coll) { $data = Solution::whereIn('id', $coll)->sum('fee'); if ($data) { return $data; } }