From c4ebc772cd4b1f9d5ed214301c53b6131719732c Mon Sep 17 00:00:00 2001 From: omair saleh Date: Thu, 25 Nov 2021 01:13:36 +0800 Subject: [PATCH] add command for sending do to vt --- app/Console/Commands/EmailDoToVTCommand.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Console/Commands/EmailDoToVTCommand.php b/app/Console/Commands/EmailDoToVTCommand.php index 8ac28a9a..954a9202 100644 --- a/app/Console/Commands/EmailDoToVTCommand.php +++ b/app/Console/Commands/EmailDoToVTCommand.php @@ -60,12 +60,11 @@ class EmailDoToVTCommand extends Command { Auth::login(User::findOrFail(1)); - chdir(storage_path()); $zip_file = 'do_from_11_nov_to_23_nov.zip'; $attachment = storage_path().'/'.$zip_file; $zip = new ZipArchive(); if ($zip->open($attachment, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)) { - + chmod($attachment, 0777); $bookings = \App\Models\Booking::where('status', ApprovalStatus::COMPLETED)->whereDate('updated_at', '>=', Carbon::parse('12-11-2021'))->whereDate('updated_at', '<=', Carbon::parse('23-11-2021')) ->whereHas('transactions', function ($query){ return $query->where('type', TransactionType::BILL)->where('issuer', 2);