Session api token validation

This commit is contained in:
dredgy committed 2026-06-23 11:20:01 +10:00
1 parent cd1538ba12
commit fcba639bae
25 files changed
+491 -235

No files matched your search

+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();
}