Merge branch 'dillon/34.4-jenkins-vapor' into vapor/development

This commit is contained in:
Dillon Ngo
2024-05-26 20:04:53 +08:00
@@ -31,19 +31,17 @@ class DownloadBookingDocumentLogic
Auth::login(User::findOrFail(1));
$document_type = str_replace(' ', '', $request->input('type'));
$zipDirectory = storage_path('/app/documents/collections');
$zipDirectory = storage_path('app/documents/collections');
if (!file_exists($zipDirectory)) {
mkdir($zipDirectory, 0755, true);
}
$zip_file = $document_type.'.zip';
$attachment = storage_path().'/app/documents/collections/' . $zip_file;
Log::info('attachment 1: '. $attachment);
// $attachment = storage_path().'/app/documents/collections/' . $zip_file;
// Log::info('attachment 1: '. $attachment);
$attachment = "{$zipDirectory}/{$zip_file}";
Log::info('attachment 2: '. $attachment);
Log::info('attachment: '. $attachment);
$bookings = Booking::where('status', ApprovalStatus::COMPLETED)
->whereDate('created_at', '>=', Carbon::parse($request->input('startDate')))