Skip to content

Commit

Permalink
Rename to getAuthModel
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 authored Oct 10, 2024
1 parent 92aaf61 commit 3c4909d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Auth/Concerns/WithAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ protected function getAuthModel(): ?User

protected function getAuthKey(): int|string|null
{
return $this->getAuthUser()?->getRouteKey();
return $this->getAuthModel()?->getRouteKey();
}

protected function can(string $ability, mixed $arguments = []): bool
{
return $this->getAuthUser()?->can($ability, $arguments);
return $this->getAuthModel()?->can($ability, $arguments);
}

protected function cannot(string $ability, mixed $arguments = []): bool
{
return $this->getAuthUser()?->cannot($ability, $arguments);
return $this->getAuthModel()?->cannot($ability, $arguments);
}
}

0 comments on commit 3c4909d

Please sign in to comment.