|
@@ -21,6 +21,10 @@ class TopicDetailTransformer extends TransformerAbstract
|
|
|
{
|
|
|
return [
|
|
|
'id' => $topic['id'],
|
|
|
+ 'name' => $topic['name'],
|
|
|
+ 'img' => $topic['img'],
|
|
|
+ 'follow_count' => $topic->follow->count(),
|
|
|
+ 'is_follow' => $topic->follow->where('uid', $this->uid)->count()?1:0,
|
|
|
];
|
|
|
}
|
|
|
}
|