wesmiler 2 yıl önce
ebeveyn
işleme
474c13a7c7
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  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) {
                     $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]);
+                        });
                     });
                 }
             })