@@ -45,6 +45,10 @@ class MemberFollowTopicRepository {
'updated_at' => $date,
];
}
+ //判断用户是否关注过话题
+ if($this->memberFollowTopic->where('uid', $token['user']->uid)->exists()){
+ return jsonSuccess();
+ }
DB::beginTransaction();
try{
$res = $this->memberFollowTopic->insert($category_topic_data);