PHPackages                             iwindy/laravel-permission - 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. iwindy/laravel-permission

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

iwindy/laravel-permission
=========================

07PHP

Since Apr 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/iwindy/laravel-permission)[ Packagist](https://packagist.org/packages/iwindy/laravel-permission)[ RSS](/packages/iwindy-laravel-permission/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

介绍
--

[](#介绍)

```
一个优雅的laravel路由授权扩展

```

安装
--

[](#安装)

```
composer require iwindy/laravel-permission

```

发布资源
----

[](#发布资源)

```
php artisan vendor:publish --provider="Iwindy\LaravelPermission\PermissionServiceProvider"

```

数据迁移
----

[](#数据迁移)

```
php artisan migrate

```

设置路由权限名称
--------

[](#设置路由权限名称)

```
Route::get('home', 'Home@index')->auth('首页');
Route::post('system', 'SystemController@seting')->auth('系统', '设置');

// 资源路由
Route::resource('users', App\Http\Controllers\UserController::class)->auth('用户管理');
Route::resource('users', App\Http\Controllers\UserController::class)->auth('用户管理',[
    'index' => '用户列表',
    'create' => '创建用户',
]);
```

获取权限节点
------

[](#获取权限节点)

```
    use Iwindy\LaravelPermission\Facade\Permission;

    // 获取树状权限节点
    Permission::getAuthNodesTree();
    // 获取完整的权限节点
    Permission::generateFullNodes();
    // 获取所有路由的权限节点
    Permission::getNodes();
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d22fc922d92aea530584d6632ae37888d3b0611e012dc218522175d0987c766?d=identicon)[iwindy](/maintainers/iwindy)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/iwindy-laravel-permission/health.svg)

```
[![Health](https://phpackages.com/badges/iwindy-laravel-permission/health.svg)](https://phpackages.com/packages/iwindy-laravel-permission)
```

###  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)
