*/ use HasFactory, HasRoles, Notifiable, TwoFactorAuthenticatable; /** The five operator roles that grant access to the admin console. */ public const OPERATOR_ROLES = ['Owner', 'Admin', 'Support', 'Billing', 'Read-only']; /** True when this user is a CluPilot operator (has any admin role). */ public function isOperator(): bool { return $this->hasAnyRole(self::OPERATOR_ROLES); } /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'is_admin' => 'boolean', ]; } }