option('all')){ $zone = 'all'; }else if($this->option('1')){ $zone = '1'; }else if ($this->option('2')){ $zone = '2'; }else if ($this->option('3')){ $zone = '3'; } $monthly = Carbon::now(); $monthly = new Carbon(); $previousmonth = $monthly->subMonthsNoOverflow()->endOfMonth(); $tahun = $previousmonth->year; $month = $previousmonth->month; $response = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/reports/updateigall',[ 'month' => $month, 'year' => $tahun, ]); if ($response->successful()) { $data = $response->json(); Log::info('Imbang Duga update successful', [ 'month' => $month, 'year' => $tahun, 'data' => $data ]); $this->info('Imbang Duga update successful'); } else { Log::error('API error', [ 'url' => $response->effectiveUri(), 'status' => $response->status(), 'body' => $response->body() ]); } } }