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