configModel = $config; } /** * 쪽지 * @method GET * @see /admin/config/setting/note */ public function index() { return view('admin.config.setting.note', []); } /** * 쪽지 저장 * @method POST * @see /admin/config/setting/note */ public function store(Request $request) { $rules = [ 'use_note' => 'numeric|nullable', 'note_list_page' => 'numeric|nullable', 'note_mobile_list_page' => 'numeric|nullable', 'use_note_mobile_dhtml' => 'numeric|nullable', 'point_note' => 'numeric|nullable', 'use_note_file' => 'numeric|nullable', 'note_save_limit_day' => 'numeric|nullable', 'note_store_save_limit_day' => 'numeric|nullable', 'note_save_limit' => 'numeric|nullable', 'note_once_send_limit' => 'string|nullable', 'note_today_send_limit' => 'numeric|nullable', 'note_content_limit' => 'numeric|nullable' ]; $attributes = [ 'use_note' => '쪽지 기능', 'note_list_page' => '한페이지 쪽지수 - PC', 'note_mobile_list_page' => '한페이지 쪽지수 - 모바일', 'use_note_mobile_dhtml' => '쪽지 DHTML 기능', 'point_note' => '쪽지 발송시 차감포인트', 'point_note_file' => '파일 첨부시 차감포인트', 'use_note_file' => '쪽지 첨부파일 기능', 'note_save_limit_day' => '기본 보관일', 'note_store_save_limit_day' => '보관함 보관일', 'note_save_limit' => '보관함 최대개수', 'note_once_send_limit' => '동시 전송 제한 수', 'note_today_send_limit' => '하루 전송 제한 수', 'note_content_limit' => '작성 가능 글자 수' ]; $posts = $this->validate($request, $rules, [], $attributes); $this->configModel->save($posts, $attributes); $message = '쪽지 정보가 저장되었습니다.'; return redirect()->route('admin.config.setting.note.index')->with('message', $message); } }