예제 #1
0
파일: Course.php 프로젝트: santonil2003/yii
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideos()
 {
     return $this->hasMany(Video::className(), ['course_id' => 'id']);
 }
예제 #2
0
파일: VideoTag.php 프로젝트: abutouq/video
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVideo()
 {
     return $this->hasOne(Video::className(), ['id' => 'video_id']);
 }
예제 #3
0
파일: Tags.php 프로젝트: abutouq/video
 /**
  * @return ActiveQuery
  */
 public function getVideos()
 {
     return $this->hasMany(Video::className(), ['id' => 'video_id'])->viaTable('video_tag', ['tag_id' => 'id']);
 }