예제 #1
0
 public function getPosts()
 {
     return $this->hasOne(Posts::className(), ['post_category' => 'category_id']);
 }
예제 #2
0
 public function getPosts()
 {
     return $this->hasOne(Posts::className(), ['post_author' => 'user_id']);
 }