http->getWithToken('pull_updates/assist/getUpdateVersionJson', $accessToken); $body = $response->json(); $latest = $body['version'] ?? null; return [ 'current_version' => $this->currentVersion, 'latest_version' => $latest, 'has_update' => $latest && version_compare($latest, $this->currentVersion, '>'), ]; } catch (\Throwable $e) { Log::channel('vikon')->warning('Version check failed', ['error' => $e->getMessage()]); return [ 'current_version' => $this->currentVersion, 'latest_version' => null, 'has_update' => false, 'error' => 'Не удалось проверить обновления', ]; } } }