|
@@ -19,6 +19,21 @@ class SuggestTransformer extends TransformerAbstract
|
|
|
return [
|
|
|
'type' => 0,
|
|
|
'id' => $post['id'],
|
|
|
+ 'created_at' => Carbon::parse($post['created_at'])->toDateTimeString(),
|
|
|
+ 'uid' => $post['uid'],
|
|
|
+ 'username' => $post['username'],
|
|
|
+ 'avatar' => $post['avatar'],
|
|
|
+ 'topic' => $post->topic(),
|
|
|
+ 'content' => subtext($post['content'], 20),
|
|
|
+ 'location' => $post['location'],
|
|
|
+ 'pv' => $post->data->pv,
|
|
|
+ 'praise_count' => $post->data->praise_count,
|
|
|
+ 'share_count' => $post->data->share_count,
|
|
|
+ 'comment_count' => $post->data->comment_count,
|
|
|
+ 'collect_count' => $post->data->collect_count,
|
|
|
+ 'create_bean' => $post->data->create_bean,
|
|
|
+ 'is_suggest' => $post['is_suggest'],
|
|
|
+ 'is_hide' => $post['is_hide'],
|
|
|
];
|
|
|
}
|
|
|
}
|