Przeglądaj źródła

Update FollowRequest model

Daniel Supernault 6 lat temu
rodzic
commit
0dc8d70639
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10 0
      app/FollowRequest.php

+ 10 - 0
app/FollowRequest.php

@@ -17,4 +17,14 @@ class FollowRequest extends Model
     {
         return $this->belongsTo(Profile::class, 'following_id', 'id');
     }
+
+    public function actor()
+    {
+        return $this->belongsTo(Profile::class, 'follower_id', 'id');
+    }
+
+    public function target()
+    {
+        return $this->belongsTo(Profile::class, 'following_id', 'id');
+    }
 }