예제 #1
0
파일: Game.php 프로젝트: buuug7/game4039
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategory()
 {
     return $this->hasOne(GameCategory::className(), ['id' => 'category_id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getGameCategories()
 {
     return $this->hasMany(GameCategory::className(), ['parent_id' => 'id']);
 }