ozan12
$files = [
'/path/to/file1.pdf',
'/path/to/file2.jpg',
'/path/to/file3.docx',
];
// Laravel Storage kullandığınızı varsayıyorum
$zipFile = storage_path('app/files.zip')
$zip = new ZipArchive();
$zip->open($zipFile, ZipArchive::CREATE | ZipArchive::OVERWRITE);
foreach($files as $file) {
$zip->addFile($file, basename($file));
}
$zip->close();