Esempio n. 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCourse()
 {
     return $this->hasOne(Course::className(), ['id' => 'course_id']);
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCourses()
 {
     return $this->hasMany(Course::className(), ['institute_id' => 'id']);
 }
Esempio n. 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCourses()
 {
     return $this->hasMany(Course::className(), ['id' => 'course_id'])->viaTable('user_has_course', ['user_id' => 'id']);
 }