|
@@ -16,10 +16,6 @@ class PostTransformer extends TransformerAbstract
|
|
|
{
|
|
|
public function transform(Post $post)
|
|
|
{
|
|
|
- $imgs = [];
|
|
|
- foreach($post->imgs as $img){
|
|
|
- $imgs[] = $img;
|
|
|
- }
|
|
|
return [
|
|
|
'id' => $post['id'],
|
|
|
'created_at' => Carbon::parse($post['created_at'])->toDateTimeString(),
|
|
@@ -34,7 +30,7 @@ class PostTransformer extends TransformerAbstract
|
|
|
'share_count' => $post->data->share_real_count.'/'.$post->data->share_count,
|
|
|
'comment_count' => $post->data->comment_count,
|
|
|
'collect_count' => $post->data->collect_real_count.'/'.$post->data->collect_count,
|
|
|
- 'will_collect_bean' => $post->data->will_collect_bean,
|
|
|
+ 'create_bean' => $post->data->create_bean,
|
|
|
'is_suggest' => $post['is_suggest'],
|
|
|
];
|
|
|
}
|