getPdo(); $props = [ 'php' => PHP_VERSION, 'db' => strtolower($pdo->getAttribute(PDO::ATTR_SERVER_VERSION)), 'version' => $versionSvc->getCurrentVersion(false), ]; try { $stat = Stat::new('event', 'install', $props); $client = new VaCentral(); $client->postStat($stat); } catch (Exception $e) { Log::error($e->getMessage()); } } public function sendUpdate() { if (setting('general.telemetry') === false) { return; } $versionSvc = app(VersionService::class); $props = [ 'version' => $versionSvc->getCurrentVersion(false), ]; try { $stat = Stat::new('event', 'update', $props); $client = new VaCentral(); $client->postStat($stat); } catch (Exception $e) { Log::error($e->getMessage()); } } }