fetchData(); } public function fetchData() { try { $this->updating = true; $response = Http::get('https://api.example.com/reportStationRatings'); if ($response->successful()) { $this->data = $response->json()['data'] ?? []; } else { $this->alert('error', 'Failed to fetch station rating report data.'); } } catch (\Exception $e) { $this->alert('error', 'An error occurred: ' . $e->getMessage()); } finally { $this->updating = false; } } public function render() { return view('livewire.reports.station-rating-list')->layout('layouts.app', ['title' => 'Station Rating Report']); } }