public function getPackages() { $packagesModel = Membershipdetails::find()->select(['MemId', 'MembershipName', 'cost'])->where(['status' => 'Active'])->asArray()->all(); $packageAry = array(); $i = 0; foreach ($packagesModel as $packages) { $packageAry[$i]['id'] = $packages['MemId']; $packageAry[$i]['name'] = $packages['MembershipName']; $packageAry[$i]['cost'] = $packages['cost']; $i++; } return $packageAry; //print_r($packageAry);exit(); }
/** * pricing */ public function actionPricing() { $this->layout = "@app/views/layouts/vendor"; $model = new Membershipdetails(); $pricingInfo = Membershipdetails::find()->all(); //print_r($pricingInfo);exit(); return $this->render('pricing', ['pricingInfo' => $pricingInfo]); }