Ver Fonte

wesmiler

wesmiler há 2 anos atrás
pai
commit
474c13a7c7
1 ficheiros alterados com 5 adições e 1 exclusões
  1. 5 1
      app/Services/Api/MessageService.php

+ 5 - 1
app/Services/Api/MessageService.php

@@ -263,7 +263,11 @@ class MessageService extends BaseService
 
 
                 if ($userId) {
                 if ($userId) {
                     $query->where(function ($query) use ($userId) {
                     $query->where(function ($query) use ($userId) {
-                        $query->where(['a.from_uid' => $userId,'a.from_show'=>1])->orWhere(['a.to_uid' => $userId,'a.to_show'=>1]);
+                        $query->where(function($query) use($userId){
+                            $query->where(['a.from_uid' => $userId,'a.from_show'=>1]);
+                        })->orWhere(function($query) use($userId){
+                            $query->where(['a.to_uid' => $userId,'a.to_show'=>1]);
+                        });
                     });
                     });
                 }
                 }
             })
             })