Преглед на файлове

加一个内容详情图

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;
             }