Sfoglia il codice sorgente

Update FollowRequest model

Daniel Supernault 6 anni fa
parent
commit
0dc8d70639
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  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');
+    }
 }