download billing documents

This commit is contained in:
omair saleh
2022-03-02 04:23:40 +08:00
parent d9f59cf31c
commit 9083dea144
@@ -23,7 +23,7 @@ class DownloadBookingDocumentLogic
/**
* @param Request $request
* @return void
* @return \Symfony\Component\HttpFoundation\BinaryFileResponse
* @throws MalformedRequestException
*/
public function execute(Request $request)
@@ -48,10 +48,10 @@ class DownloadBookingDocumentLogic
}
$zip->close();
header('Content-Type: application/zip');
header('Content-Length: ' . filesize($attachment));
readfile($attachment);
return response()->download($attachment)->deleteFileAfterSend(true);
// header('Content-Type: application/zip');
// header('Content-Length: ' . filesize($attachment));
// readfile($attachment);
// unlink($attachment);
}