/** * @return \yii\db\ActiveQuery */ public function getServicePage() { return $this->hasOne(ServicePage::className(), ['id' => 'service_page_id']); }
/** * @return \yii\db\ActiveQuery */ public function getServicePages() { return $this->hasMany(ServicePage::className(), ['category_id' => 'id']); }