Download the PHP package thoth-pharaoh/permission without Composer

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

權限管理器

管理者 透過管理群組 group 來管理各個權限項目

關聯圖:

版本匹配

Laravel package
8.X 1.X
9.X 2.X

安裝

你可以使用 composer 做安裝

Migrate 資料表

匯出 Config

匯出 Migration

必須先至 config/permission.php 設定權限內容

使用方法

使用 Trait:

在欲使用權限管理的 model 引入 HasPermission Trait

管理者加入一個管理群組

參數 說明 類型 範例
$groupId 管理群組ID int 1

獲取管理者所屬群組

使用 getPermissions 方法獲取該管理者所擁有的權限

使用 getPermissions 方法取得該群組的所有管理權限

使用 addPermissions 方法更新該管理群組的權限

參數 說明 類型 範例
$permissionKeys 權限代碼 array [1101, 1102, 1103]

$permissionKeys 代碼以 config.permission.php 中 items 內定義為主

使用 deleteGroup 方法刪除該管理群組及對應權限


使用 Middleware:

先註冊 permission middleware

App\Http\Kernel.php

在需要檢查權限的路由加入 permission middleware 及 權限代碼(代碼以config.permission.php為主)

檢查多組權限

permission middleware 需設定至 auth middleware 之後


需要 group model 反查關聯的 model 資料:

動態綁定 group 多對多 多行關聯

AppServiceProvider.php


使用 Artisan Command 新增 root group 所有權限:

root group 以 config.permission.php 中,欄位 root_group_name 名稱為主


All versions of permission with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
illuminate/support Version >=9.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 thoth-pharaoh/permission contains the following files

Loading the files please wait ....