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

+ 2 - 2
app/Repositories/PostRepositories.php

@@ -375,11 +375,11 @@ class PostRepositories
             $post = $this->post;
             $order = 'post.id';
         }elseif($type == 'collect'){
-            $post = $this->post->join('post_collect', 'post_collect.post_id', '=', 'post.id');
+            $post = $this->post->withTrashed()->join('post_collect', 'post_collect.post_id', '=', 'post.id');
             $where[] = ['post_collect.uid', $uid];
             $order = 'post_collect.id';
         }else{
-            $post = $this->post->join('post_share', 'post_share.post_id', '=', 'post.id');
+            $post = $this->post->withTrashed()->join('post_share', 'post_share.post_id', '=', 'post.id');
             $where[] = ['post_share.uid', $uid];
             $order = 'post_share.updated_at';
         }