search ? ['search' => $this->search] : []; return $this->service->getAllUsosConvenio($filters)->map(function ($appointment) { $row = $this->service->formatUsoConvenio($appointment); return [ $row['convenio'] ?? '', $this->service->usoConvenioTipoLabel($row['type']), $row['servico'] ?? '', $row['associado'] ?? '', $row['criado_em'] ?? '', $row['agendado_em'] ?? '', ]; }); } public function headings(): array { return ['Convênio', 'Tipo', 'Serviço', 'Associado', 'Criação do Agendamento', 'Data do Agendamento']; } public function title(): string { return 'Usos do Convênio'; } public function columnWidths(): array { return ['A' => 35, 'B' => 20, 'C' => 35, 'D' => 35, 'E' => 24, 'F' => 24]; } public function styles(Worksheet $sheet): array { return [ 1 => [ 'font' => ['bold' => true, 'color' => ['argb' => 'FFFFFFFF']], 'fill' => ['fillType' => Fill::FILL_SOLID, 'startColor' => ['argb' => 'FF661D75']], 'alignment' => ['horizontal' => Alignment::HORIZONTAL_CENTER], ], ]; } }