Download the PHP package sixbyte/perchecker without Composer

On this page you can find all versions of the php package sixbyte/perchecker. 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 perchecker

Perchecker

基于 laravel5.* 的权限管理包

特性

参考了 artesaos/Defender 和其他权限管理包的一些特性,但也有一些跟他们不一样的地方

不一样

  1. 路由只和权限绑定, 存储在数据库
  2. 权限有父级权限的树状结构
  3. 简单的管理操作

安装

配置

app/config/app.php$providers$aliases 数组下分别添加 providers

aliases

设置资源

数据迁移

路由入库

Trait 在 app/User.php 添加

配置完成

使用

在 app\Http\Kernel.php 的 $routeMiddleware 数组 注册中间件

在需要权限检查的路由下使用中间件

为用户 1 绑定新角色

为角色 1 绑定权限

为路由 1 绑定权限 同上

配置文件

是否有此权限, 及权限的父权限 pre_permission_id

: hasPermission($p) $p 权限的id属性值或者名字属性值

权限的验证方式:

  1. 查找用户的所以角色
  2. 求出这些角色的权限并集
  3. 查找私有权限,和角色权限求并集
  4. 检查 权限 是否在并集里存在,存在 true, 不存在 false

是否有此角色

: hasRole($r) $p 角色的id属性值或者名字属性值

获取所有权限

用户

角色

扩展

  1. 继承 Model 类,修改配置文件

  2. 重新编写 中间件, ServiceProvider, 修改注册文件

  3. 替换HasPermissionTrait.php

All versions of perchecker with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
laravel/framework Version ~5.0|~5.1
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 sixbyte/perchecker contains the following files

Loading the files please wait ....