/** * @return Province */ public function getProvince() { return $this->hasOne(Province::className(), ['id' => 'provinceId']); }
/** * @return array - list of Province having all the provinces belonging to this country */ public function getProvinces() { return $this->hasMany(Province::className(), ['countryId' => 'id']); }