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 2mo ago

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 49% 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

3431d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/971cbe88d4bac6c5b8c7a3911caf1f6100f4c83c075ec872ff2e0ed3080e0f44?d=identicon)[wordenfan](/maintainers/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

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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