예제 #1
0
파일: Post.php 프로젝트: alperkantarci/post
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getType()
 {
     return $this->hasOne(Type::className(), ['id' => 'type_id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTypes()
 {
     return $this->hasMany(Type::className(), ['category_id' => 'id']);
 }