diff --git a/app/Jobs/MergeCurrencyAndGoldRates.php b/app/Jobs/MergeCurrencyAndGoldRates.php new file mode 100644 index 0000000..7df5141 --- /dev/null +++ b/app/Jobs/MergeCurrencyAndGoldRates.php @@ -0,0 +1,35 @@ +getData('currency/today.json'); + $goldData = $this->getData('gold/today.json'); + + // Verileri birleştir + $mergedData = array_merge($currencyData, $goldData); + + // Birleştirilmiş veriyi dışarıya aktar + Storage::put('merged/rates.json', json_encode($mergedData, JSON_UNESCAPED_UNICODE)); + } + + private function getData($path) + { + if (Storage::exists($path)) { + return json_decode(Storage::get($path), true); + } + return []; + } +} \ No newline at end of file