public function getCouponCategories() { return $this->hasMany(CouponCategories::className(), ['CategoryID' => 'CategoryID'])->viaTable('CouponCategoryInfo', ['CouponID' => 'CouponID']); }
private function getAllCategories() { $category = CouponCategories::find()->orderBy('Name')->all(); return $category; }