get(); // Modifikasi data dan tambahkan nomor $data = $customers->map(function ($customer) use (&$nomor) { return [ 'No' => $nomor++, 'Nama Customer' => $customer->name, 'Kode Customer' => $customer->code_customer, 'Lot No' => $customer->lot_no, 'No Telepon' => $customer->no_tlp, 'Alamat' => $customer->address, ]; }); return $data; } public function headings(): array { return [ 'No', 'NAMA CUSTOMER', 'kODE CUSTOMER', 'LOT NO', 'NO TELEPONE', 'ALAMAT', ]; } }