duqinya %!s(int64=5) %!d(string=hai) anos
pai
achega
2e7cde575f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Repositories/BeanRepository.php

+ 2 - 2
app/Repositories/BeanRepository.php

@@ -222,11 +222,11 @@ class BeanRepository
                 ->find($request['post_id']);
             if ($post){
                 $post->created_time = Carbon::parse($post->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;