Browse Source

Update Follower model, add permalink method

Daniel Supernault 6 years ago
parent
commit
2876ec30d4
1 changed files with 6 additions and 0 deletions
  1. 6 0
      app/Follower.php

+ 6 - 0
app/Follower.php

@@ -21,6 +21,12 @@ class Follower extends Model
         return $this->belongsTo(Profile::class, 'following_id', 'id');
     }
 
+    public function permalink()
+    {
+        $path = $this->actor->permalink("/follow/{$this->id}");
+        return url($path);
+    }
+
     public function toText()
     {
         $actorName = $this->actor->username;