Session api token validation

This commit is contained in:
2026-06-23 11:20:01 +10:00
parent cd1538ba12
commit fcba639bae
25 changed files with 491 additions and 235 deletions
+3 -3
View File
@@ -140,19 +140,19 @@ class User extends Authenticatable
public function following(): HasMany
{
return $this->hasMany(Followee::class, 'user_id');
return $this->hasMany(Followee::class, 'user_id')->verified();
}
public function followers(): HasMany
{
return $this->hasMany(Followee::class, 'followee_id');
return $this->hasMany(Followee::class, 'followee_id')->verified();
}
public function isFollowing(User $user): bool
{
return $this->following()
->where('followee_id', $user->id)
->verified()
->exists();
}