*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'user_id' => $this->user_id, 'imap_host' => $this->imap_host, 'imap_port' => $this->imap_port, 'imap_encryption' => $this->imap_encryption, 'imap_validate_cert' => (bool) $this->imap_validate_cert, 'imap_username' => $this->imap_username, 'imap_folder' => $this->imap_folder, 'imap_password_configured' => filled($this->imap_password), 'smtp_host' => $this->smtp_host, 'smtp_port' => $this->smtp_port, 'smtp_encryption' => $this->smtp_encryption, 'smtp_validate_cert' => (bool) $this->smtp_validate_cert, 'smtp_username' => $this->smtp_username, 'smtp_from_address' => $this->smtp_from_address, 'smtp_from_name' => $this->smtp_from_name, 'smtp_password_configured' => filled($this->smtp_password), 'has_imap_configuration' => $this->hasImapConfiguration(), 'has_smtp_configuration' => $this->hasSmtpConfiguration(), 'last_synced_at' => $this->last_synced_at, 'last_sync_error' => $this->last_sync_error, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]; } }