Download the PHP package shannon/permission without Composer

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

permission_api

使用教程

1、安装扩展
composer require zizaco/entrust
2、使用步骤

<1>、在config/app.php的providers数组添加一项:Zizaco\Entrust\EntrustServiceProvider::class,alias也添加一项;'Entrust' => Zizaco\Entrust\EntrustFacade::class,
<2>、在config/auth.php的providers的users添加一项:'table' => 'bas_user'
<3>、在app\Http\Kernel.php的$routeMiddleware添加3项:
'role' => \Zizaco\Entrust\Middleware\EntrustRole::class,
'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class,
'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,
<4>、将app下的3个php文件复制到项目的app文件夹下,如果此文件夹下已有User.php,则添加两个属性即可:use EntrustUserTrait;protected $table = 'bas_user';table是用户数据表。
<6>app\Http\Controllers/PermissionController复制到项目的Controllers下, 如果没有改动过Controller.php,则可以直接覆盖掉; 若改动过Controller.php,则添加checkPermission()和getUserId()方法并在构造函数添加$this->checkPermission(); 并且添加protected $userId = null;protected $user;两个属性
<7>、routes/permission.php复制到项目路由文件夹routes,并在web.php添加require_once 'permission.php'; <8>、app\Http\Services/PermissionService.php复制到项目app\Http\Services文件夹下(没有则创建)
<9>、将views下面的所有文件复制到项目的resource/views下

All versions of permission with dependencies

PHP Build Version
Package Version
No informations.
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 shannon/permission contains the following files

Loading the files please wait ....