diff --git a/src/Auth/Concerns/WithAuthentication.php b/src/Auth/Concerns/WithAuthentication.php index 316f1e3..da66bd2 100644 --- a/src/Auth/Concerns/WithAuthentication.php +++ b/src/Auth/Concerns/WithAuthentication.php @@ -24,7 +24,7 @@ protected function getAuthModel(): ?Authenticatable protected function getAuthKey(): int|string|null { - return $this->getAuthUser()?->getRouteKey(); + return $this->getAuthModel()?->getRouteKey(); } protected function can(string $ability, mixed $arguments = []): bool