previousStatus = $this->server->status; } public static function canAccess(): bool { return auth()->user()?->can('view', request()->route('server')) ?? false; } #[On('$refresh')] public function refresh(): void { $currentStatus = $this->server->refresh()->status; if ($this->previousStatus !== $currentStatus) { $this->redirect(static::getUrl(parameters: ['server' => $this->server])); } $this->previousStatus = $currentStatus; } public function getWidgets(): array { if ($this->server->isInstalling()) { return [ [Installing::class, ['server' => $this->server]], ]; } return []; } }