Browse Source

Update FollowRequest model

Daniel Supernault 6 years ago
parent
commit
0dc8d70639
1 changed files with 10 additions and 0 deletions
  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');
+    }
 }