get(); // Modifikasi data dan tambahkan nomor $data = $warehouses->map(function ($warehouse) use (&$nomor) { return [ 'No' => $nomor++, 'Nama Gudang' => $warehouse->name, 'Deskripsi' => $warehouse->description, 'Alamat' => $warehouse->address, ]; }); return $data; } public function headings(): array { return [ 'No', 'NAMA GUDANG', 'DESKRIPSI', 'ALAMAT', ]; } }