/** * @return \yii\db\ActiveQuery */ public function getCities() { return $this->hasMany(\app\modules\sakila\models\City::className(), ['country_id' => 'country_id']); }
/** * @return \yii\db\ActiveQuery */ public function getCity() { return $this->hasOne(\app\modules\sakila\models\City::className(), ['city_id' => 'city_id']); }