first commit

This commit is contained in:
Ümit Tunç
2025-01-17 21:38:08 +03:00
commit f6ef9fafdc
105 changed files with 17540 additions and 0 deletions
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Controllers;
use App\Jobs\FetchCurrencyRates;
use Illuminate\Support\Facades\Storage;
class CurrencyController extends Controller
{
public function getCurrentRates()
{
// Job'ı çalıştır
// $data = FetchCurrencyRates::dispatchSync();
// JSON dosyasından oku
if (Storage::exists('currency/today.json')) {
return response()->json(
json_decode(Storage::get('currency/today.json'), true)
);
}
return response()->json(['error' => 'Veri bulunamadı'], 404);
}
}