wzq 5 vuotta sitten
vanhempi
commit
0791b960a7
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      app/Repositories/BeanRepository.php

+ 2 - 1
app/Repositories/BeanRepository.php

@@ -248,8 +248,9 @@ class BeanRepository
         if (isset($request['post_id']) && $request['post_id']){
             $post = $this->getPostInfo($request['post_id'], 1);
             if ($post){
+                $topic = $this->getTopic($post['topic_ids']);
                 $post['created_time'] = Carbon::parse($post['created_at'])->diffForHumans();
-                $post['topic'] = $this->getTopic($post['topic_ids']);
+                $post['topic'] = array_column($topic, 'name');
                 $star_detail['post'] = $post;
             }else{
                 Log::debug($request['post_id']);