Skip to content

Commit

Permalink
use whereKey instead
Browse files Browse the repository at this point in the history
  • Loading branch information
JorrinKievit committed Sep 24, 2024
1 parent cf591f2 commit 866f6e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Bridge/AuthCodeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public function persistNewAuthCode(AuthCodeEntityInterface $authCodeEntity)
*/
public function revokeAuthCode($codeId)
{
Passport::authCode()->where(Passport::authCode()->getKeyName(), $codeId)->update(['revoked' => true]);
Passport::authCode()->whereKey($codeId)->update(['revoked' => true]);
}

/**
* {@inheritdoc}
*/
public function isAuthCodeRevoked($codeId)
{
return Passport::authCode()->where(Passport::authCode()->getKeyName(), $codeId)->where('revoked', 1)->exists();
return Passport::authCode()->whereKey($codeId)->where('revoked', 1)->exists();
}
}
6 changes: 3 additions & 3 deletions src/TokenRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function create($attributes)
*/
public function find($id)
{
return Passport::token()->where(Passport::token()->getKeyName(), $id)->first();
return Passport::token()->whereKey($id)->first();
}

/**
Expand All @@ -37,7 +37,7 @@ public function find($id)
*/
public function findForUser($id, $userId)
{
return Passport::token()->where(Passport::token()->getKeyName(), $id)->where('user_id', $userId)->first();
return Passport::token()->whereKey($id)->where('user_id', $userId)->first();
}

/**
Expand Down Expand Up @@ -86,7 +86,7 @@ public function save(Token $token)
*/
public function revokeAccessToken($id)
{
return Passport::token()->where(Passport::token()->getKeyName(), $id)->update(['revoked' => true]);
return Passport::token()->whereKey($id)->update(['revoked' => true]);
}

/**
Expand Down

0 comments on commit 866f6e7

Please sign in to comment.