コード例 #1
0
ファイル: Company.php プロジェクト: soanni/stocks_mvc
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCountry()
 {
     return $this->hasOne(Country::className(), ['countryid' => 'countryid']);
 }
コード例 #2
0
ファイル: User.php プロジェクト: rocketyang/admap
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCountries()
 {
     return $this->hasMany(Country::className(), ['user_id' => 'id']);
 }