*/ protected $casts = [ 'last_login_at' => 'datetime', 'password_hash' => 'hashed', ]; public function getAuthPassword(): ?string { return $this->password_hash; } public function usesPassword(): bool { return $this->password_hash !== null && $this->password_hash !== ''; } }