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