protected function setKeyInEnvironmentFile($key)
    {
        $currentContent = file_get_contents(base_path('.env'));

        $currentValue = '';

        if (preg_match('/^GLIDE_SIGN_KEY=(.*)$/m', $currentContent, $matches) && isset($matches[1])) {
            $currentValue = $matches[1];
        }

        file_put_contents(base_path('.env'), str_replace(
            'GLIDE_SIGN_KEY='.$currentValue,
            'GLIDE_SIGN_KEY='.$key,
            $currentContent
        ));
    }