/** * @return \yii\db\ActiveQuery */ public function getMentors() { return $this->hasMany(Mentor::className(), ['id' => 'mentor_id'])->viaTable('{{%mentor_entrepreneur}}', ['entrepreneur_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getMentor() { return $this->hasOne(Mentor::className(), ['id' => 'mentor_id']); }