From 3c4909d8bcd0203c7adcbca54580d0ac1f48e426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20M=2E?= Date: Thu, 10 Oct 2024 19:07:41 +0200 Subject: [PATCH] Rename to getAuthModel --- src/Auth/Concerns/WithAuthentication.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Auth/Concerns/WithAuthentication.php b/src/Auth/Concerns/WithAuthentication.php index 7ea4c33..b14bf48 100644 --- a/src/Auth/Concerns/WithAuthentication.php +++ b/src/Auth/Concerns/WithAuthentication.php @@ -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); } }