json(); $conditions = $data["data"]["conditions"]; Cache::put('weather_data', $conditions, now()->addSeconds(60)); return $conditions; } catch (Exception $ex) { return null; } } /** * Get the view / contents that represent the component. */ public function render(): View|Closure|string { return view('components.weather', [ 'conditions' => $this->getWeatherData(), ]); } }