loadServers(); } public function loadServers() { $this->servers = UptimeServer::where('is_active', true) ->orderBy('name') ->get(); } public function refreshStatus() { $this->isRefreshing = true; try { $monitoringService = new UptimeMonitoringService(); $monitoringService->checkAllServers(); $this->loadServers(); $this->dispatch('status-refreshed'); } catch (\Exception $e) { // Handle error } finally { $this->isRefreshing = false; } } public function render() { return view('uptime-lab::index', [ 'servers' => $this->servers, ])->layoutData([ 'sidebar' => true, ]); } }