|
@@ -81,4 +81,14 @@ class MemberFollowTopicRepository {
|
|
|
->select('member_follow_topic.id','uid','topic_id','topic.name as topic_name','topic.is_suggest')
|
|
|
->paginate($perPage);
|
|
|
}
|
|
|
+ //获取用户关注话题
|
|
|
+ public function getMemberTopic($uid){
|
|
|
+ return $this->memberFollowTopic
|
|
|
+ ->leftJoin('topic', 'member_follow_topic.topic_id', '=', 'topic.id')
|
|
|
+ ->where(['member_follow_topic.uid'=>$uid])
|
|
|
+ //->select('member_follow_topic.id','uid','topic_id','topic.name as topic_name','topic.is_suggest')
|
|
|
+ ->select('topic.name as topic_name')
|
|
|
+ ->take(3)
|
|
|
+ ->get();
|
|
|
+ }
|
|
|
}
|