configModel = $config; } /** * 경험치 * @method GET * @see /admin/config/setting/exp */ public function index() { return view('admin.config.setting.exp', []); } /** * 경험치 저장 * @method POST * @see /admin/config/setting/exp */ public function store(Request $request) { $rules = [ 'use_exp' => 'numeric|nullable', 'exp_register' => 'numeric|nullable', 'exp_login' => 'numeric|nullable', 'exp_recommended' => 'numeric|nullable', 'exp_recommender' => 'numeric|nullable', 'exp_attendance' => 'numeric|nullable', 'exp_poll' => 'numeric|nullable' ]; $attributes = [ 'use_exp' => '경험치 기능', 'exp_register' => '회원가입 시 경험치', 'exp_login' => '로그인 시 경험치', 'exp_recommended' => '회원가입 시 추천인에게 경험치', 'exp_recommender' => '추천인 존재 시 가입자에게 경험치', 'exp_attendance' => '출석 시 경험치', 'exp_poll' => '설문조사 시 경험치' ]; $posts = $this->validate($request, $rules, [], $attributes); $this->configModel->save($posts, $attributes); $message = '경험치 정보가 저장되었습니다.'; return redirect()->route('admin.config.setting.exp.index')->with('message', $message); } }