PHPackages                             worden/shaka-auth-for-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. worden/shaka-auth-for-laravel

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

worden/shaka-auth-for-laravel
=============================

cty shaka rbac management system

v1.0.1(9y ago)133MITPHPPHP &gt;=5.5.9

Since Nov 23Pushed 9y ago2 watchersCompare

[ Source](https://github.com/wordenfan/shaka-auth)[ Packagist](https://packagist.org/packages/worden/shaka-auth-for-laravel)[ RSS](/packages/worden-shaka-auth-for-laravel/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

概述
--

[](#概述)

This is a shaka-auth for test inspire by [Zizaco/entrust](https://github.com/Zizaco/entrust)

安装方法
----

[](#安装方法)

```
composer require "worden/shaka-auth-for-laravel:1.0.x-dev"
```

使用说明
----

[](#使用说明)

kernel.php的$routeMiddleware增加中间件

```
'shakaAuth' => \Cty\ShakaAuth\Middleware\ShakaAuth::class,
```

user的调用方法

```
$user = User::where('id',1056)->first();
$res = $user->roleList();
$res = $user->hasRole([25,26]);
$res = $user->attachRole(27);
$res = $user->detachRole(27);
$res = $user->canDo([12,'manage_posts3']);
$res = $user->basePermission()->menu();
$res = $user->basePermission()->func();
```

role的调用方法

```
$role = Role::where('id',25)->first();
$res2 = $role->attachPermission(17);
$res2 = $role->detachPermission([18]);
$res2 = $role->userList();
$res2 = $role->hasPermission(['manage_posts2','manage_posts3']);
$res2 = $role->permissionList();
$res2 = $role->basePermission()->menu();
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Total

2

Last Release

3479d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13416375?v=4)[wordenfan](/maintainers/wordenfan)[@wordenfan](https://github.com/wordenfan)

---

Top Contributors

[![wordenfan](https://avatars.githubusercontent.com/u/13416375?v=4)](https://github.com/wordenfan "wordenfan (6 commits)")

### Embed Badge

![Health badge](/badges/worden-shaka-auth-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/worden-shaka-auth-for-laravel/health.svg)](https://phpackages.com/packages/worden-shaka-auth-for-laravel)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
