mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update Profile model, add hasFollowRequestById method
This commit is contained in:
parent
5d24b254e5
commit
a5a5224d0d
1 changed files with 7 additions and 0 deletions
|
@ -296,4 +296,11 @@ class Profile extends Model
|
||||||
{
|
{
|
||||||
return $this->hasMany(Collection::class);
|
return $this->hasMany(Collection::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasFollowRequestById(int $id)
|
||||||
|
{
|
||||||
|
return FollowRequest::whereFollowerId($id)
|
||||||
|
->whereFollowingId($this->id)
|
||||||
|
->exists();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue