|
@@ -23,6 +23,9 @@ class CommentTransformer extends TransformerAbstract
|
|
|
$replyData = Redis::GET($replyKey);
|
|
|
if($replyData){
|
|
|
$reply = json_decode($replyData);
|
|
|
+ foreach($reply as &$item){
|
|
|
+ $item['created_at'] = Carbon::parse($item['created_at'])->diffForHumans();
|
|
|
+ }
|
|
|
}else{
|
|
|
$replies = PostComment::where('parent_id', $postComment['id'])->orderBy('id', 'desc')->limit(2)->get();
|
|
|
foreach($replies as $val){
|