/** * @return \yii\db\ActiveQuery */ public function getCounty() { return $this->hasOne(County::className(), ['id' => 'county_id']); }
/** * @return \yii\db\ActiveQuery */ public function getCounties() { return $this->hasMany(County::className(), ['state_id' => 'id']); }