download billing documents

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