コード例 #1
0
ファイル: Questions.php プロジェクト: Abzal/onlinelearn
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContent()
 {
     return $this->hasOne(Content::className(), ['id' => 'content_id']);
 }
コード例 #2
0
ファイル: UserDb.php プロジェクト: vetal06/diplom
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContents()
 {
     return $this->hasMany(Content::className(), ['user_id' => 'id']);
 }