Download the PHP package wyanlord/yii2-rbac-vue without Composer

On this page you can find all versions of the php package wyanlord/yii2-rbac-vue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-rbac-vue

Yii2前后端分离

修复初始化账号的bug

一、下载Yii2框架 下载地址:https://github.com/yiisoft/yii2-app-advanced/releases

1、修改composer.json

在文件末尾修改repositories为国内源,并忽略前端资源的包

删除require-dev中的所有包,仅保留gii即可

在require末尾添加wyanlord/yii2-rbac-vue包

最后使用composer来更新这些包

2、修改common/main.php,全部采用npm来管理前端资源

3、修改backend下的gii配置文件,只有开发环境下,并且是gii请求时,才加载该模块,并删除项目自带的debug模块

二、配置Yii2后端

1、创建用户表与rbac权限表

需要在console的配置文件中临时添加下面配置,创建rbac要用到,结束后删除掉

2、后台backend的main.php配置文件如下

wyrbac\Module模块名必须定义为wyrbac,否则需要修改前端固定的Api请求地址

3、修改backend\controllers\SiteController,仅保留error与index操作,其他都删除

三、backview的相关配置

1、下载nodejs

windows环境的下载地址:http://nodejs.cn/download/

2、部署backview

从vendor包wyanlord中拷贝backview文件夹到项目的根目录下,与backend处于同一级别

3、接口域名配置

路径为backview/config目录下的dev.env.js、test.env.js和prod.env.js

4、开始运行

5、nginx配置如下

6、创建管理员账号

访问接口API域名地址http://localhost/wyrbac/login/register-default 路由来创建管理员admin,同时会创建对应的角色

默认为admin/admin,权限为superadmin

给角色配置路由权限的时候,如果增删了一些路由,要点击上面的‘更新路由’按钮进行路由刷新

7、使用gii生成crud前端

model的生成还是Yii2官方的操作

crud的生成如下

生成好了以后,需要在router里按照system路由的配置方法来配置你的路由,并添加到index.js里


All versions of yii2-rbac-vue with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wyanlord/yii2-rbac-vue contains the following files

Loading the files please wait ....