public function actionIndex() { $model = new Coupon(); $pageSize = 60; $couponData = $model->getAllCoupons($pageSize); $result = $couponData['coupons']; $pagination = $couponData['pagination']; $websites = Website::getAllWebsites(); $categories = CouponCategories::getAllCouponCategories(); //Coupon::$lastresult = $result; return $this->render('index', ['coupons' => $result, 'pagination' => $pagination, 'websites' => $websites, 'categories' => $categories]); }