|
@@ -49,6 +49,13 @@ class SuggestTransformer extends TransformerAbstract
|
|
|
'reply' => $reply,
|
|
|
];
|
|
|
}
|
|
|
+ $topic = [];
|
|
|
+ foreach($post->topic() as $key => $val){
|
|
|
+ $topic[] = [
|
|
|
+ 'id' => $key,
|
|
|
+ 'name' => $val
|
|
|
+ ];
|
|
|
+ }
|
|
|
return [
|
|
|
'show_type' => 0,
|
|
|
'id' => $post['id'],
|
|
@@ -57,7 +64,7 @@ class SuggestTransformer extends TransformerAbstract
|
|
|
'uid' => $post['uid'],
|
|
|
'username' => $post['username'],
|
|
|
'avatar' => $post['avatar'],
|
|
|
- 'topic' => $post->topic(),
|
|
|
+ 'topic' => $topic,
|
|
|
'title' => $post['title'],
|
|
|
'content' => $post['content'],
|
|
|
'location' => $post['location'],
|