From 836030c5271fb1b3433dab764504dd404f5a8094 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 3 Nov 2018 21:16:19 -0600 Subject: [PATCH] Update Follower model --- app/Follower.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Follower.php b/app/Follower.php index 54eddd358..322b29a0f 100644 --- a/app/Follower.php +++ b/app/Follower.php @@ -6,6 +6,9 @@ use Illuminate\Database\Eloquent\Model; class Follower extends Model { + + protected $fillable = ['profile_id', 'following_id', 'local_profile']; + public function actor() { return $this->belongsTo(Profile::class, 'profile_id', 'id'); @@ -21,9 +24,9 @@ class Follower extends Model return $this->belongsTo(Profile::class, 'following_id', 'id'); } - public function permalink() + public function permalink($append = null) { - $path = $this->actor->permalink("/follow/{$this->id}"); + $path = $this->actor->permalink("/follow/{$this->id}{$append}"); return url($path); }