*/ use HasFactory, Notifiable, PasskeyAuthenticatable, TwoFactorAuthenticatable; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } /** * Get the user's initials */ public function initials(): string { $initials = Str::initials($this->name, true); return Str::length($initials) > 1 ? Str::substr($initials, 0, 1).Str::substr($initials, -1) : $initials; } /** * Determine whether the user is an administrator. */ public function isAdmin(): bool { return (bool) $this->is_admin; } /** * Get the maximum length allowed for todo notes. */ public function notesLimit(): int { return $this->notes_limit ?? 1000; } }