App\Http\Controllers\User\Settings\SettingController::updateCommon PHP 메소드

updateCommon() 공개 메소드

update Common setting
public updateCommon ( Request $request, CaptchaManager $captcha ) : Illuminate\Http\RedirectResponse
$request Xpressengine\Http\Request
$captcha Xpressengine\Captcha\CaptchaManager
리턴 Illuminate\Http\RedirectResponse
    public function updateCommon(Request $request, CaptchaManager $captcha)
    {
        $inputs = $request->only(['useCaptcha', 'webmasterName', 'webmasterEmail', 'agreement', 'privacy']);
        if ($inputs['useCaptcha'] === 'true' && !$captcha->available()) {
            throw new ConfigurationNotExistsException();
        }
        app('xe.config')->put('user.common', $inputs);
        return redirect()->back()->with('alert', ['type' => 'success', 'message' => '저장되었습니다.']);
    }