setMonthIncome(); $this->setMonthRegisterTotal(); } private function setMonthIncome() { Redis::set( 'getMonthIncome', Order::where('created_at', '>', strtotime(date('Y-m-1'))) ->where('created_at', '>', time()) ->where('status', '3') ->where('callback_no', '!=', NULL) ->sum('total_amount') ); } private function setMonthRegisterTotal() { Redis::set( 'getMonthRegisterTotal', User::where('created_at', '>', strtotime(date('Y-m-1'))) ->where('created_at', '>', time()) ->count() ); } }