/** * 게시판 설정 등록 * * @return \Illuminate\Http\RedirectResponse */ public function globalUpdate() { $beforeConfig = $this->configHandler->getDefault(); $inputs = Input::only(array_keys($beforeConfig->getPureAll())); $config = $this->configHandler->putDefault($inputs); return Redirect::to($this->urlHandler->managerUrl('global.edit')); }
public function storeCategory(CategoryHandler $categoryHandler, Request $request) { $boardId = $request->get('boardId'); $input = ['name' => $boardId . '-' . BoardModule::getId()]; $category = $categoryHandler->create($input); if ($boardId == '') { // global config $config = $this->configHandler->getDefault(); $config->set('categoryId', $category->id); $this->configHandler->putDefault($config->getPureAll()); } else { $config = $this->configHandler->get($boardId); $config->set('categoryId', $category->id); $this->instanceManager->updateConfig($config->getPureAll()); } return XePresenter::makeApi($category->getAttributes()); }