mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 05:53:58 +00:00
download billing documents
This commit is contained in:
@@ -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 = storage_path() . '/' . $zip_file;
|
||||
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open($attachment, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE)) {
|
||||
@@ -66,9 +66,11 @@ class DownloadBookingDocumentLogic
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
|
||||
dd(Storage::exists($attachment));
|
||||
dd(File::exists($attachment));
|
||||
return Storage::download($attachment);
|
||||
File::delete($attachment);
|
||||
|
||||
exit;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user