فهرست منبع

Update Profile model

Daniel Supernault 6 سال پیش
والد
کامیت
908740b46f
1فایلهای تغییر یافته به همراه14 افزوده شده و 4 حذف شده
  1. 14 4
      app/Profile.php

+ 14 - 4
app/Profile.php

@@ -275,10 +275,20 @@ class Profile extends Model
                     ]
                     ]
                 ];
                 ];
                 break;
                 break;
-            
-            default:
-                # code...
-                break;
         }
         }
+        return $audience;
+    }
+
+    public function getAudienceInbox($scope = 'public')
+    {
+        return $this
+            ->followers()
+            ->whereLocalProfile(false)
+            ->get()
+            ->map(function($follow) {
+                return $follow->sharedInbox ?? $follow->inbox_url;
+             })
+            ->unique()
+            ->toArray();
     }
     }
 }
 }