diff --git a/app/Classes/Modules/Bookings/ControllersLogic/DownloadBookingDocumentLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/DownloadBookingDocumentLogic.php index 2886b897..9893a39b 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/DownloadBookingDocumentLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/DownloadBookingDocumentLogic.php @@ -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); } }