download billing documents

This commit is contained in:
omair saleh
2022-03-02 03:39:11 +08:00
parent 3d92c0915f
commit 3feb15fd98
@@ -41,10 +41,10 @@ class DownloadBookingDocumentLogic
/**
* @param Request $request
* @return JsonResponse
* @return bool
* @throws MalformedRequestException
*/
public function execute(Request $request): JsonResponse
public function execute(Request $request)
{
Auth::login(User::findOrFail(1));
@@ -66,10 +66,7 @@ class DownloadBookingDocumentLogic
}
$zip->close();
return Storage::exists($attachment);
File::delete($attachment);
exit;
return Storage::download($attachment);
}
}