10 Star 54 Fork 28

Pear Admin / Pear Admin Yii2

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md
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.

About

🏄 基于 Yii2 实 现 的 RBAC 权 限 管 理 开 发 平 台 expand collapse
PHP and 6 more languages
BSD-3-Clause
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
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

Search

F2647f8d 8189591 Bbdfb06e 8189591