download billing documents

This commit is contained in:
omair saleh
2022-03-02 03:27:10 +08:00
parent d64cd0bfe4
commit 5c8a821d26
@@ -49,7 +49,7 @@ class DownloadBookingDocumentLogic
Auth::login(User::findOrFail(1));
$zip_file = $request->input('type').'.zip';
$attachment = storage_path('/documents/collections/'.$zip_file);
$attachment = 'documents/collections'.$zip_file;
$zip = new ZipArchive();
if ($zip->open($attachment, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE)) {
@@ -67,7 +67,8 @@ class DownloadBookingDocumentLogic
$zip->close();
return Storage::download('/documents/collections/'.$zip_file);
dd(Storage::disk('documents')->exists($attachment));
return Storage::download($attachment);
}
}