Explorar o código

Update FollowRequest model

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
0dc8d70639
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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');
+    }
 }