orderBy('name', 'asc') ->get() ->map(fn($u) => [ $u->name, $u->phone ?? '', $u->email ?? '', ]); } public function headings(): array { return ['Nome', 'Telefone', 'E-mail']; } public function title(): string { return 'Contatos'; } public function columnWidths(): array { return ['A' => 40, 'B' => 22, 'C' => 35]; } 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], ], ]; } }