application/manage/controller/MemberGroup.php
public function addGroup(Request $request)
    {
        $group_logic = MemberGroupLogic::instance();
        if ($request->isPost()) {
            $data = [
                'group_name' => $request->param('group_name'),
                'group_info' => $request->param('group_info', ''),
                'home_page' => $request->param('home_page', ''),
                'group_status' => $request->param('group_status', 0)
            ];
            
            // 验证群组
            $res = $group_logic->validate->scene('add')->check($data);
            if (! $res) {
                return $this->error($group_logic->validate->getError());
            }
            
            // 添加群组
            $group_logic->model->add($data);
            
            return $this->success('添加群组成功', Url::build('memberGroup/index'));
        } else {
            $this->site_title = '新增群组';
            
            // 群组状态
            $group_status = $group_logic->groupStatus();
            $this->assign('group_status', $group_status);
            
            return $this->fetch();
        }
    }
public function addGroup(Request $request)
    {
        $group_logic = MemberGroupLogic::instance();
        if ($request->isPost()) {
            $data = [
                'group_name' => $request->param('group_name'),
                'group_info' => $request->param('group_info', ''),
                'home_page' => $request->param('home_page', ''),
                'group_status' => $request->param('group_status', 0)
            ];
            
            // 验证群组
            $res = $group_logic->validate->scene('add')->check($data);
            if (! $res) {
                return $this->error($group_logic->validate->getError());
            }
            
            // 添加群组
            $group_logic->model->add($data);
            
            return $this->success('添加群组成功', Url::build('memberGroup/index'));
        } else {
            $this->site_title = '新增群组';
            
            // 群组状态
            $group_status = $group_logic->groupStatus();
            $this->assign('group_status', $group_status);
            
            return $this->fetch();
        }
    }
添加群组

@param Request $request
@return mixed