info(Carbon::now() . ' : Show Billplz payment status started.'); $start = new Carbon(); $billplz_id = $this->argument('billplz_id'); $billplz_id = explode(",", $billplz_id); foreach ($billplz_id as $payment) { $response = Http::withBasicAuth(config('billplz.api_key').':', '')->get(config('billplz.base_url').'/api/v3/bills/'.$payment); if($response->successful()){ $data = $response->json(); dump($data); }else{ $this->info("billplz error
"); } } $end = new Carbon(); $elapsedTime = $start->diff($end)->format('%H:%I:%S'); $this->info(Carbon::now() . ' : Done Showing Billplz payment status. ElapsedTime: ' . $elapsedTime); } }