src/Helpers/CanvasHelper.php
public static function getCurrentVersion($update = true)
    {
        $extMan = new ExtensionManager(resolve('app'), resolve('files'));
        $packageName = self::CORE_PACKAGE;
        $version = 'Unknown';

        // Retrieve framework (Easel) package info.
        $core = $extMan->getExtension(str_replace('/', '-', self::CORE_PACKAGE), ['canvas-framework']);
        $version = $core->getVersion();
        $dist = $core->__get('dist');
        if (substr($version, 0, 4) === 'dev-') {
            $version .= ' '.substr($dist['reference'], 0, 12);
        }

        // Save to Canvas Settings
        if ($update) {
            $setting = Settings::updateOrCreate(
                ['setting_name' => 'canvas_version'],
                ['setting_value' => $version]
            );
        }

        return $version;
    }
public static function getCurrentVersion($update = true)
    {
        $extMan = new ExtensionManager(resolve('app'), resolve('files'));
        $packageName = self::CORE_PACKAGE;
        $version = 'Unknown';

        // Retrieve framework (Easel) package info.
        $core = $extMan->getExtension(str_replace('/', '-', self::CORE_PACKAGE), ['canvas-framework']);
        $version = $core->getVersion();
        $dist = $core->__get('dist');
        if (substr($version, 0, 4) === 'dev-') {
            $version .= ' '.substr($dist['reference'], 0, 12);
        }

        // Save to Canvas Settings
        if ($update) {
            $setting = Settings::updateOrCreate(
                ['setting_name' => 'canvas_version'],
                ['setting_value' => $version]
            );
        }

        return $version;
    }
Get the currently installed version of Canvas.

@param bool $update If set to true, latest version in DB will be updated.
@return string