get('pterodactyl.load_environment_only', false)) { return; } // Only set the email driver settings from the database if we // are configured using SMTP as the driver. if ($config->get('mail.driver') === 'smtp') { $this->keys = array_merge($this->keys, $this->emailKeys); } $values = $settings->all()->mapWithKeys(function ($setting) { return [$setting->key => $setting->value]; })->toArray(); foreach ($this->keys as $key) { $value = array_get($values, 'settings::' . $key, $config->get(str_replace(':', '.', $key))); if (in_array($key, self::$encrypted)) { try { $value = $encrypter->decrypt($value); } catch (DecryptException $exception) { } } $config->set(str_replace(':', '.', $key), $value); } } /** * @return array */ public static function getEncryptedKeys(): array { return self::$encrypted; } }