wzq 5 年 前
コミット
592feb7640
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2 2
      app/Repositories/BeanRepository.php

+ 2 - 2
app/Repositories/BeanRepository.php

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