From b1fdfda4ae2fa893a9f47475e45e4b2d56111321 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Tue, 29 Oct 2024 13:18:16 +0330 Subject: [PATCH] added gold price 5 --- app/Console/Commands/GoldPriceUpdate.php | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app/Console/Commands/GoldPriceUpdate.php b/app/Console/Commands/GoldPriceUpdate.php index 86f1b3c..1da9e0a 100644 --- a/app/Console/Commands/GoldPriceUpdate.php +++ b/app/Console/Commands/GoldPriceUpdate.php @@ -33,20 +33,20 @@ class GoldPriceUpdate extends Command // echo 'start'; - $client = new Client(); - $response = $client->request('GET', $this->api); - $data = json_decode($response->getBody()->getContents()); - print_r($data); - if (isset($data->gold)) { - - $s = Setting::where('key', 'gold')->first(); - $s->value = $data->gold; - $s->save(); - $this->info('Price updated successfully'); - }else{ - $this->error('Price update failed'); - } - Log::info('updated gold price'); +// $client = new Client(); +// $response = $client->request('GET', $this->api); +// $data = json_decode($response->getBody()->getContents()); +// print_r($data); +// if (isset($data->gold)) { +// +// $s = Setting::where('key', 'gold')->first(); +// $s->value = $data->gold; +// $s->save(); +// $this->info('Price updated successfully'); +// }else{ +// $this->error('Price update failed'); +// } +// Log::info('updated gold price'); } }