コード例 #1
0
ファイル: Jury.php プロジェクト: h8every1/pro-education
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategories()
 {
     return $this->hasMany(WorkCategory::className(), ['id' => 'category_id'])->viaTable('jury_category', ['jury_id' => 'id']);
 }
コード例 #2
0
ファイル: Work.php プロジェクト: h8every1/pro-education
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategory()
 {
     return $this->hasOne(WorkCategory::className(), ['id' => 'category_id']);
 }