Download the PHP package casbin/think-adapter without Composer

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

Think-Casbin

Build Status Coverage Status Latest Stable Version Total Downloads License

PHP-Casbin 是一个强大的、高效的开源访问控制框架,它支持基于各种访问控制模型的权限管理。

Think-Casbin 是一个专为ThinkPHP5.1定制的Casbin的扩展包,使开发者更便捷的在thinkphp项目中使用Casbin。

针对 ThinkPHP6.0 现在推出了更加强大的扩展 ThinkPHP 6.0 Authorization.

知识储备

安装

  1. 创建thinkphp项目(如果没有):

  2. ThinkPHP项目里,安装Think-Casbin扩展:

  3. 发布资源:

这将自动创建model配置文件config/casbin-basic-model.conf,和Casbin的配置文件config/casbin.php

  1. 数据迁移:

由于Think-Casbin默认将Casbin的策略(Policy)存储在数据库中,所以需要初始化数据库表信息。

执行前,请确保数据库连接信息配置正确,如需单独修改Casbin的数据库连接信息或表名,可以修改config/casbin.php里的配置。

这将会自动创建Casbin的策略(Policy)表casbin_rule

用法

为用户分配权限

判断是权限策略是否存在

移除权限

使用决策器,验证权限

自定义配置

config/casbin-basic-model.conf为Casbin的model文件

config/casbin.php为Casbin的adapter、db配置信息

更多API参考

关于

Think-Casbin

通过Casbin官网 (https://casbin.org )查看更多用法。


All versions of think-adapter with dependencies

PHP Build Version
Package Version
Requires topthink/framework Version 5.1.*
topthink/think-migration Version ^2.0
casbin/casbin Version ^1.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 casbin/think-adapter contains the following files

Loading the files please wait ....