From 2876ec30d46508341eeaf1fa8ad79fbf610c4c62 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 9 Oct 2018 19:21:45 -0600 Subject: [PATCH] Update Follower model, add permalink method --- app/Follower.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Follower.php b/app/Follower.php index 118495fe2..54eddd358 100644 --- a/app/Follower.php +++ b/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;