コード例 #1
0
ファイル: Application.php プロジェクト: dench/resistor
 public function getTypes()
 {
     return $this->hasMany(Type::className(), ['id' => 'type_id'])->viaTable('application_type', ['application_id' => 'id']);
 }
コード例 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getType()
 {
     return $this->hasOne(Type::className(), ['type_id' => 'type_id']);
 }