download billing documents

This commit is contained in:
omair saleh
2022-03-02 03:45:42 +08:00
parent ecb52af5e6
commit 8610714f34
@@ -50,7 +50,7 @@ class DownloadBookingDocumentLogic
Auth::login(User::findOrFail(1));
$zip_file = $request->input('type').'.zip';
$attachment = storage_path().'/app/documents/collections/' . $zip_file;
dd(Storage::disk('documents'));
$zip = new ZipArchive();
if ($zip->open($attachment, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE)) {
@@ -66,7 +66,7 @@ dd(Storage::disk('documents'));
}
$zip->close();
return Storage::download($attachment);
return Storage::disk('documents')->download('collections/' . $zip_file);
}
}