From 0dc8d7063990e6804afe98e4154acd90217d0095 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 31 Dec 2018 23:25:00 -0700 Subject: [PATCH] Update FollowRequest model --- app/FollowRequest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/FollowRequest.php b/app/FollowRequest.php index df7757eb..89bd26e9 100644 --- a/app/FollowRequest.php +++ b/app/FollowRequest.php @@ -17,4 +17,14 @@ class FollowRequest extends Model { return $this->belongsTo(Profile::class, 'following_id', 'id'); } + + public function actor() + { + return $this->belongsTo(Profile::class, 'follower_id', 'id'); + } + + public function target() + { + return $this->belongsTo(Profile::class, 'following_id', 'id'); + } }