checkForUpdate(); } public function checkForUpdate(): void { $currentVersion = config('app.version'); if (! $currentVersion) { return; } $response = Cache::get('latest_release'); if (! $response) { return; } // Handle both single release object and array of releases if (is_array($response) && isset($response[0])) { // Array of releases - find the latest one $latestRelease = $response[0]; $latestVersion = Arr::get($latestRelease, 'tag_name'); } else { // Single release object $latestVersion = Arr::get($response, 'tag_name'); } if ($latestVersion && version_compare($latestVersion, $currentVersion, '>')) { $this->hasUpdate = true; } } } ?> @if($hasUpdate) @endif