1
0
Fork 0

Update Follower model, add permalink method

This commit is contained in:
Daniel Supernault 2018-10-09 19:21:45 -06:00
parent 84d1e3b731
commit 2876ec30d4
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 6 additions and 0 deletions

View File

@ -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;