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

+ 3 - 2
app/Repositories/BeanRepository.php

@@ -223,8 +223,9 @@ 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){
+                $post_imgs = $post->imgs;
+                $imgs = [];
+                foreach($post_imgs as $img){
                     $imgs[] = $img['img'];
                 }
                 $post->imgs = $imgs;