|
@@ -38,15 +38,15 @@ class TopicPostTransformer extends TransformerAbstract
|
|
$reply = [];
|
|
$reply = [];
|
|
foreach($replies as $val){
|
|
foreach($replies as $val){
|
|
$reply[] = [
|
|
$reply[] = [
|
|
- 'username' => subtext($val->username, 10),
|
|
|
|
- 'reply_username' => subtext($val->reply_username, 10),
|
|
|
|
|
|
+ 'username' => $val->username,
|
|
|
|
+ 'reply_username' => $val->reply_username,
|
|
'content' => $val->content,
|
|
'content' => $val->content,
|
|
];
|
|
];
|
|
}
|
|
}
|
|
$comment[] = [
|
|
$comment[] = [
|
|
'id' => $item->id,
|
|
'id' => $item->id,
|
|
- 'username' => subtext($item->username, 10),
|
|
|
|
- 'content' => subtext($item->content, 10),
|
|
|
|
|
|
+ 'username' => $item->username,
|
|
|
|
+ 'content' => $item->content,
|
|
'reply_count' => $replyCount,
|
|
'reply_count' => $replyCount,
|
|
'reply' => $reply,
|
|
'reply' => $reply,
|
|
];
|
|
];
|
|
@@ -55,7 +55,7 @@ class TopicPostTransformer extends TransformerAbstract
|
|
foreach($post->topic() as $key => $val){
|
|
foreach($post->topic() as $key => $val){
|
|
$topic[] = [
|
|
$topic[] = [
|
|
'id' => $key,
|
|
'id' => $key,
|
|
- 'name' => subtext($val, 5)
|
|
|
|
|
|
+ 'name' => $val
|
|
];
|
|
];
|
|
}
|
|
}
|
|
$isFollow = 0;
|
|
$isFollow = 0;
|
|
@@ -68,7 +68,7 @@ class TopicPostTransformer extends TransformerAbstract
|
|
'type' => $post['type'],
|
|
'type' => $post['type'],
|
|
'created_at' => Carbon::parse($post['created_at'])->diffForHumans(),
|
|
'created_at' => Carbon::parse($post['created_at'])->diffForHumans(),
|
|
'uid' => $post['uid'],
|
|
'uid' => $post['uid'],
|
|
- 'username' => subtext($post['username'], 10),
|
|
|
|
|
|
+ 'username' => $post['username'],
|
|
'avatar' => $post['avatar'],
|
|
'avatar' => $post['avatar'],
|
|
'topic' => $topic,
|
|
'topic' => $topic,
|
|
'title' => $post['title'],
|
|
'title' => $post['title'],
|