latest_version ?? '0.0.0'); $currentVersion = new Version($instance->current_version ?? '0.0.0'); if ($latestVersion == $appVersion && $currentVersion != $latestVersion) { // The instance has been updated to the latest version. We reset // the ping data. $instance->current_version = $instance->latest_version; $instance->latest_release_notes = null; $instance->number_of_versions_since_current_version = null; $instance->save(); } } return $next($request); } }