Skip to content
基于Yii2+layui的后台框架模板,实现了完善的RBAC权限控制
Branch: master
Clone or download
Latest commit 16a2468 May 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets baidu May 16, 2019
commands 呵呵 Nov 7, 2018
components 小问题 Nov 26, 2018
config baidu May 16, 2019
controllers 小问题 Nov 26, 2018
mail/layouts 呵呵 Nov 7, 2018
models 小问题 Nov 26, 2018
modules/admin 小问题 Nov 26, 2018
node_modules baidu May 16, 2019
runtime 呵呵 Nov 7, 2018
tests 呵呵 Nov 7, 2018
vagrant 呵呵 Nov 7, 2018
vendor vendor Nov 13, 2018
views baidu May 16, 2019
web baidu May 16, 2019
widgets filter Nov 23, 2018
.bowerrc 呵呵 Nov 7, 2018
.gitattributes Create .gitattributes Dec 27, 2018
.gitignore vendor Nov 13, 2018
LICENSE.md 呵呵 Nov 7, 2018
README.md Update README.md Apr 11, 2019
Vagrantfile 呵呵 Nov 7, 2018
admin.sql Update admin.sql Dec 29, 2018
codeception.yml 呵呵 Nov 7, 2018
composer.json 小问题 Nov 14, 2018
composer.lock 呵呵 Nov 7, 2018
docker-compose.yml 呵呵 Nov 7, 2018
package-lock.json baidu May 16, 2019
requirements.php 呵呵 Nov 7, 2018
yii
yii.bat 呵呵 Nov 7, 2018

README.md

Yii2-Admin-Theme 基于layui的通用后台模板


Build Status

return [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=admin',
    'username' => 'root',
    'password' => '123456',
    'charset' => 'utf8',

    // Schema cache options (for production environment)
    //'enableSchemaCache' => true,
    //'schemaCacheDuration' => 60,
    //'schemaCache' => 'cache',
];

系统截图:

菜单配置:config/menu.php

return [
    'menu'=>[
        'data'=> ['label'=>'主页','items'=>[
                ['label' => '主页',
                    'items' => [
                        ['label' => '主页概览', 'url' => ['/site']]
                    ]
                ]
            ]
        ],
        'setting'=> ['label'=>'系统设置', 'items'=>[
                ['label' => '权限管理',
                    'items' => [
                        ['label' => '用户管理', 'url' => ['/admin/user']],
                        ['label' => '角色管理', 'url' => ['/admin/roles']],
                        ['label' => '权限列表', 'url' => ['/admin/permission']],
                        ['label' => '路由列表', 'url' => ['/admin/route']],
                        ['label' => '规则列表', 'url' => ['/admin/rule']]
                    ]
                ],
                ['label' => '个人中心',
                    'items' => [
                        ['label' => '修改密码', 'url' => ['/admin/personal/reset-password']],
                    ]
                ]
            ]
        ]
    ]
];

权限配置:config/permission.php

return [
    [
        'label' => 'root 权限',
        'items' => [
            [
                'label' =>  'root',
                'items' =>  [
                    ['url'=>'/*','label'=>Html::tag('b','root',['style'=>'color:red;']),'items' => [
                        ['url'=>'/*','label'=>Html::tag('b','root权限',['style'=>'color:red;'])],
                    ]]
                ]
            ]
        ]
    ],
    [
        'label' => '基础权限',
        'items' => [
            [
                'label' =>  '基础权限',
                'items' =>  [
                    ['label'=>'后台首页','items' => [
                        ['url'=>'/site','label'=>'首页'],
                        ['url'=>'/site/main','label'=>'首页-关键报表'],
                        ['url'=>'/filter','label'=>'筛选'],
                    ]]
                ]
            ]
        ]
    ],
    [
        'label' => '系统设置',
        'items' => [
            [
                'label' =>  '权限管理',
                'items' =>  [
                    [
                        'label' =>  '用户管理',
                        'items' =>  [
                            ['url'=>'/admin/user','label'=>'首页'],
                            ['url'=>'/admin/user/create','label'=>'新增用户'],
                            ['url'=>'/admin/user/view', 'label'=>'用户授权'],
                            ['url'=>'/admin/user/delete','label'=>'删除用户'],
                            ['url'=>'/admin/user/update','label'=>'修改用户'],
                            ['url'=>'/admin/user/change-name','label'=>'快捷修改用户名'],
                            ['url'=>'/admin/user/change-time','label'=>'快捷修改创建时间'],
                        ]
                    ],
                    ['label'=>'角色管理','items' => [
                        ['url'=>'/admin/roles','label'=>'首页'],
                        ['url'=>'/admin/roles/create','label'=>'添加角色'],
                        ['url'=>'/admin/roles/view', 'label'=>'修改角色权限'],
                        ['url'=>'/admin/roles/delete','label'=>'删除角色'],
                        ['url'=>'/admin/roles/update','label'=>'修改角色名'],
                    ]],
                    [
                        'label' =>  '权限组管理',
                        'items' =>  [
                            ['url'=>'/admin/permission','label'=>'首页'],
                            ['url'=>'/admin/permission/create','label'=>'新增权限组'],
                            ['url'=>'/admin/permission/view', 'label'=>'修改权限组权限'],
                            ['url'=>'/admin/permission/delete','label'=>'删除权限组'],
                            ['url'=>'/admin/permission/update','label'=>'修改权限组名称'],
                        ]
                    ],
                    [
                        'label' =>  '路由管理',
                        'items' =>  [
                            ['url'=>'/admin/route','label'=>'首页'],
                            ['url'=>'/admin/route/delete','label'=>'路由删除'],
                            ['url'=>'/admin/route/update','label'=>'路由修改'],
                        ]
                    ],
                    [
                        'label' =>  '规则管理',
                        'items' =>  [
                            ['url'=>'/admin/rule','label'=>'首页'],
                            ['url'=>'/admin/rule/delete','label'=>'删除规则'],
                            ['url'=>'/admin/rule/update','label'=>'修改规则'],
                            ['url'=>'/admin/rule/create','label'=>'新增规则'],
                        ]
                    ]
                ]
            ],
            [
                'label' => '个人中心',
                'items' => [
                    [
                        'label' =>  '修改密码',
                        'items' =>  [
                            ['url'=>'/admin/personal/reset-password','label'=>'首页']
                        ]
                    ]
                ]
            ]
        ]
    ]
];
You can’t perform that action at this time.