tag_name); $installedVersion = Helpers::cleanVersionNumber(config('2fauth.version')); if ($githubVersion && $installedVersion) { if (version_compare($githubVersion, $installedVersion) > 0 && $latestReleaseData->prerelease == false && $latestReleaseData->draft == false) { Settings::set('latestRelease', $latestReleaseData->tag_name); return $latestReleaseData->tag_name; } else { Settings::delete('latestRelease'); } } } return false; } /** * Fetch releases on Github * * @return string|null */ protected static function getLatestReleaseData() : string|null { try { $response = Http::retry(3, 100) ->get(config('2fauth.latestReleaseUrl')); if ($response->successful()) { Settings::set('lastRadarScan', time()); return $response->body(); } } catch (\Exception $exception) { Log::error('cannot reach latestReleaseUrl endpoint'); } return null; } }