|
@@ -6,7 +6,11 @@ use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
class FollowRequest extends Model
|
|
|
{
|
|
|
- protected $fillable = ['follower_id', 'following_id'];
|
|
|
+ protected $fillable = ['follower_id', 'following_id', 'activity', 'handled_at'];
|
|
|
+
|
|
|
+ protected $casts = [
|
|
|
+ 'activity' => 'array',
|
|
|
+ ];
|
|
|
|
|
|
public function follower()
|
|
|
{
|
|
@@ -27,4 +31,10 @@ class FollowRequest extends Model
|
|
|
{
|
|
|
return $this->belongsTo(Profile::class, 'following_id', 'id');
|
|
|
}
|
|
|
+
|
|
|
+ public function permalink($append = null)
|
|
|
+ {
|
|
|
+ $path = $this->target->permalink("#accepts/follows/{$this->id}{$append}");
|
|
|
+ return url($path);
|
|
|
+ }
|
|
|
}
|