public function updateSetting(Request $request, ThemeHandler $themeHandler)
{
$this->validate($request, ['theme' => 'required']);
$themeId = $request->get('theme');
$theme = $themeHandler->getTheme($themeId);
if (!$theme->hasSetting()) {
throw new NotSupportSettingException();
}
$configInfo = $request->only('_configTitle', '_configId');
$inputs = $request->except('_token');
$inputs['_configId'] = $themeId;
// 해당 테마에게 config를 가공할 수 있는 기회를 준다.
$config = $theme->resolveSetting($inputs);
$config = array_merge($configInfo, $config);
$themeHandler->setThemeConfig($config['_configId'], $config);
return redirect()->back()->with('alert', ['type' => 'success', 'message' => '저장되었습니다.']);
}