浏览代码

Update FollowRequest model

Daniel Supernault 6 年之前
父节点
当前提交
0dc8d70639
共有 1 个文件被更改,包括 10 次插入0 次删除
  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');
+    }
 }