application/manage/controller/Config.php
public function index(Request $request)
    {
        $this->site_title = '配置列表';
        
        $map = [];
        $config_model = ConfigLogic::model();
        
        // 配置分组
        $group_name = $request->param('group', '');
        if (! empty($group_name)) {
            $map['config_group'] = $group_name;
        }
        $this->assign('group', $group_name);
        
        // total_count
        $total_count = $config_model->where($map)->count();
        $this->assign('total_count', $total_count);
        
        // list
        $list = $config_model->where($map)
            ->order('config_sort asc')
            ->paginate($this->rows_num);
        $this->assign('list', $list);
        $this->assign('page', $list->render());
        
        // group_list
        $group_list = $config_model->field('id, config_group')
            ->group('config_group')
            ->order('config_sort asc')
            ->select();
        $this->assign('group_list', $group_list);
        
        return $this->fetch();
    }
public function index(Request $request)
    {
        $this->site_title = '配置列表';
        
        $map = [];
        $config_model = ConfigLogic::model();
        
        // 配置分组
        $group_name = $request->param('group', '');
        if (! empty($group_name)) {
            $map['config_group'] = $group_name;
        }
        $this->assign('group', $group_name);
        
        // total_count
        $total_count = $config_model->where($map)->count();
        $this->assign('total_count', $total_count);
        
        // list
        $list = $config_model->where($map)
            ->order('config_sort asc')
            ->paginate($this->rows_num);
        $this->assign('list', $list);
        $this->assign('page', $list->render());
        
        // group_list
        $group_list = $config_model->field('id, config_group')
            ->group('config_group')
            ->order('config_sort asc')
            ->select();
        $this->assign('group_list', $group_list);
        
        return $this->fetch();
    }
public function index ( Request $ request ) { $ this -> site_title = '配置列表'; $ map = [ ] ; $ config_model = ConfigLogic :: model ( ) ; // 配置分组 $ group_name = $ request -> param ( 'group' , '' ) ; if ( ! empty ( $ group_name ) ) { $ map [ 'config_group' ] = $ group_name ; } $ this -> assign ( 'group' , $ group_name ) ; // total_count $ total_count = $ config_model -> where ( $ map ) -> count ( ) ; $ this -> assign ( 'total_count' , $ total_count ) ; // list $ list = $ config_model -> where ( $ map ) -> order ( 'config_sort asc' ) -> paginate ( $ this -> rows_num ) ; $ this -> assign ( 'list' , $ list ) ; $ this -> assign ( 'page' , $ list -> render ( ) ) ; // group_list $ group_list = $ config_model -> field ( 'id, config_group' ) -> group ( 'config_group' ) -> order ( 'config_sort asc' ) -> select ( ) ; $ this -> assign ( 'group_list' , $ group_list ) ; return $ this -> fetch ( ) ; }
配置列表

@param Request $request
@return string
配置列表