10 Star 55 Fork 28

Pear Admin / Pear Admin Yii2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause


Pear Admin Yii2

基于 Yii2 + Pear Admin Layui 实现的快速开发平台

预 览 | 官 网 | 群聊 | 社区

Pear Admin Layui Version PHP Version MYSQL Version

🏄 1.项目简介

Pear Admin Yii2是基于 Yii2 + Pear Admin Layui 实现的企业级高效开发平台,采用经典的RBAC权限管理模式。是一款轻量级、易上手、开发速度快的开发平台。

📜 2.项目结构

backend
    assets              资源发布文件
    config              配置文件
    controllers         控制器文件
    modules             模块文件
        rbac            接口V1
            components  常用组件
            controllers 控制器
            messages    语言
            models      模型
            views       视图文件
            Module.php  模块
    runtime             运行缓存
    test                测试模块
    views               视图文件
    web                 入口目录
common
    cache               缓存
    config              配置文件
    mail                邮件模板
    models              模型文件
    tests               测试模块
    widgets             小部件
console
    config              配置文件
    controllers         控制器文件
    migrations          数据库迁移文件
    models              模型文件
    runtime             运行缓存
environments            环境文件
frontend
    assets              资源发布文件
    config              配置文件
    controllers         控制器文件
    models              模型文件
    runtime             运行缓存
    tests               测试模块
    views               视图
    web                 入口文件
    widgets             插件
vendor                  composer安装文件
paer_admin_yii2.sql     数据库文件

🔧 3.项目配置

  • 本地部署
    windows配置:
        <VirtualHost *:80>
            ServerName xx.com
            ServerAlias xx.com
            DocumentRoot D:/wamp/www/YourProject/backend/web
            <Directory  D:/wamp/www/YourProject/backend/web>
                Options +Indexes +Includes +FollowSymLinks +MultiViews
                AllowOverride All
                Require local
            </Directory>
        </VirtualHost>
    nginx配置:
        listen 80;
        server_name xx.com;
        index index.php index.html index.htm default.php default.htm default.html;
        root /www/wwwroot/YourProject/backend/web;
        ...
  • 数据库配置
    源文件:pear_admin_yii2.sql
    配置路径:common/config/main-local.php

🧪 4.RBAC权限案例

4.1 新增方法/路由

.. /backend/controllers/SiteController.php

    /**
     * 获取文件信息
     * */
    public function actionGetfiles(){
        ...
    }

4.2 配置路由

配置路由

4.3 新增权限

新增权限

4.4 路由添加到权限

路由添加到权限

4.5 新增角色

新增角色

4.6 权限添加到角色

权限添加到角色

4.7 用户分配角色

用户分配角色

🎨 5.项目预览

5.1 在线地址

https://pear.tsaihoo.com/

5.2 截图

Copyright © 2008 by Yii Software LLC (http://www.yiisoft.com) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Yii Software LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

🏄 基于 Yii2 实 现 的 RBAC 权 限 管 理 开 发 平 台 展开 收起
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
PHP
1
https://gitee.com/pear-admin/pear-admin-yii2.git
git@gitee.com:pear-admin/pear-admin-yii2.git
pear-admin
pear-admin-yii2
Pear Admin Yii2
master

搜索帮助