예제 #1
0
 public function getTypes()
 {
     return $this->hasMany(Type::className(), ['id' => 'type_id'])->viaTable('application_type', ['application_id' => 'id']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getType()
 {
     return $this->hasOne(Type::className(), ['type_id' => 'type_id']);
 }