浏览代码

加一个内容详情图

duqinya 5 年之前
父节点
当前提交
29496c072d
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/Repositories/BeanRepository.php

+ 5 - 0
app/Repositories/BeanRepository.php

@@ -223,6 +223,11 @@ class BeanRepository
             if ($post){
                 $created_at = $post_detail->created_at;
                 $post->created_time = Carbon::parse($created_at)->diffForHumans();
+                $imgs = $post->imgs;
+                foreach($imgs as $img){
+                    $imgs[] = $img['img'];
+                }
+                $post->imgs = $imgs;
                 $post->topic = $post->topic();
                 $star_detail['post'] = $post;
             }