acceptJson()->get($url); return $response->json(); } public function fetchOffice($latitude, $longitude): array { $apiUrl = "{$this->apiBaseUrl}/points/{$latitude}/{$longitude}"; return Cache::remember('lookup.offices', 86400, function () use ($apiUrl) { return $this->fetchFromRemoteApi($apiUrl); }); } public function fetchHourlyReport(string $weatherOffice, int $gridX, int $gridY): array { $apiUrl = "{$this->apiBaseUrl}/gridpoints/{$weatherOffice}/{$gridX}/{$gridY}/forecast/hourly"; return Cache::remember('lookup.offices', 900, function () use ($apiUrl) { return $this->fetchFromRemoteApi($apiUrl); }); } public function fetchDailyReport(string $weatherOffice, int $gridX, int $gridY): array { $apiUrl = "{$this->apiBaseUrl}/gridpoints/{$weatherOffice}/{$gridX}/{$gridY}/"; return Cache::remember('lookup.offices', 3600, function () use ($apiUrl) { return $this->fetchFromRemoteApi($apiUrl); }); } public function fetchWeeklyReport(string $weatherOffice, int $gridX, int $gridY): array { $apiUrl = "{$this->apiBaseUrl}/gridpoints/{$weatherOffice}/{$gridX}/{$gridY}/forecast"; return Cache::remember('lookup.offices', 86400, function () use ($apiUrl) { return $this->fetchFromRemoteApi($apiUrl); }); } }