From ff9d08e258b7032c09550ff4b21fee52ac6e5e05 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Thu, 17 Jul 2025 22:21:53 +0100 Subject: Last login attribute improvements --- src/HasAuthLogs.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/HasAuthLogs.php b/src/HasAuthLogs.php index 543b580..01aa768 100644 --- a/src/HasAuthLogs.php +++ b/src/HasAuthLogs.php @@ -1,4 +1,4 @@ -successfulAuthLogs()->one(); } - public function lastLogin(): Attribute + protected function lastLogin(): Attribute { return Attribute::get( - fn(): ?DateTimeInterface => $this->successfulAuthLog?->created_at + fn(): ?Carbon => $this->successfulAuthLog?->created_at ); } -- cgit v1.2.3