PHPackages                             livelyworks/laravel-yes-authority - 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. livelyworks/laravel-yes-authority

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

livelyworks/laravel-yes-authority
=================================

YesAuthority - Laravel Routes Authorization Library

2.9.16(3y ago)72.3k—0%3MITPHPPHP &gt;=5.4.0

Since Jul 27Pushed 3y ago3 watchersCompare

[ Source](https://github.com/livelyworks/YesAuthority)[ Packagist](https://packagist.org/packages/livelyworks/laravel-yes-authority)[ RSS](/packages/livelyworks-laravel-yes-authority/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (2)Versions (47)Used By (0)

**YesAuthority**
================

[](#yesauthority)

---

YesAuthority is flexible authorization system for Laravel, It checks the `route` permission to access a certain portion of the site or application. To add Permissions `User-based`, `Role-based`, `Conditionally`. It uses `authority.checkpost` middleware for filter permission of current accessing route, Under this middleware checked every permission of the user login.

**Installation**
----------------

[](#installation)

Require this package in your `composer.json` or install it by running:

```
    composer require livelyworks/laravel-yes-authority
```

Now, insert this line into your `config/app.php` under the `provider` array.

```
    LivelyWorks\YesAuthority\YesAuthorityServiceProvider::class
```

Now, run this command after that `config/yes-authority.php` and `app/Http/Middleware/YesAuthorityCheckpostMiddleware.php` files are publish.

```
    php artisan vendor:publish  --tag="yesauthority"
```

Now, insert this line into your `app/Http/Kernel.php` under the `$routeMiddleware` array.

```
    'authority.checkpost'  => \App\Http\Middleware\YesAuthorityCheckpostMiddleware::class
```

Use `authority.checkpost` middleware for handle permission base routes.

```
    Route::group(['middleware' => 'authority.checkpost'], function () {
        // Place all those routes here which needs authentication and authorization.
    });
```

Now, the basic setup is ready you need to configure rules of permissions using `config/yes-authority`.

**Configuration**
-----------------

[](#configuration)

The structure of permissions given below, but it's highly recommended to read more on [docs](https://livelyworks.github.io/YesAuthority/Sample_Structure)`.

```
    [
        'allow' => ['*'], // Allowed permission to user. Priority is less than deny.
        'deny'  => ['temp1'], // Deny permission to user. Priority is higher than allow.
    ]

    canAccess('temp1');
    // false
```

**Usage - Helpers**
-------------------

[](#usage---helpers)

- **##### canAccess($accessId = null);

    [](#canaccessaccessid--null)** Check the access, By default it check current route and return response in **boolean** value.

```
    canAccess('temp1');
    // true or false
```

- **##### canPublicAccess($accessId = null); - `Authentication not required`

    [](#canpublicaccessaccessid--null---authentication-not-required-)** Check the public access, By default it check current route and return response in **boolean** value.

```
    canPublicAccess();
    // true or false
```

**Usage - Facade**
------------------

[](#usage---facade)

- **##### YesAuthority::check($accessId = null, $requestForUserId = null)

    [](#yesauthoritycheckaccessid--null-requestforuserid--null)** Check the access of `$accessId`, By default it check current route and return response in **boolean** value, And it can check access of perticular user by passing user id `($requestForUserId)` parameter.

```
    YesAuthority::check('temp1');
    // true or false
```

- **##### YesAuthority::isPublicAccess($accessId = null); - `Authentication not required`

    [](#yesauthorityispublicaccessaccessid--null---authentication-not-required)** Check the access of `$accessId`, By default it check current route and return response in **boolean** value.

```
    YesAuthority::isPublicAccess('temp1');
    // true or false
```

**Usage - Directives**
----------------------

[](#usage---directives)

- **##### @canAccess($accessId = null);

    [](#canaccessaccessid--null-1)** Check the access, By default it check current route and return response in **boolean** value.

```
    @canAccess()
       // your logic here.
    @endAccess;
```

- **##### @canPublicAccess($accessId = null); - `Authentication not required`

    [](#canpublicaccessaccessid--null---authentication-not-required)** Check the public access, By default it check current route and return response in **boolean** value.

```
    @canPublicAccess()
       // your logic here.
    @endAccess;
```

###  Health Score

37

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 98.4% 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 ~47 days

Recently: every ~269 days

Total

44

Last Release

1117d ago

Major Versions

1.20.21 → v2.0.02017-07-29

PHP version history (2 changes)1.20.21PHP &gt;=5.6.4

v2.0.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d789e95361530e7c848a48d877b168e9a539a23ed136533d5034a65addc0e97?d=identicon)[vinodraut](/maintainers/vinodraut)

---

Top Contributors

[![vinodraut](https://avatars.githubusercontent.com/u/12695172?v=4)](https://github.com/vinodraut "vinodraut (127 commits)")[![nikhilbangre](https://avatars.githubusercontent.com/u/30627136?v=4)](https://github.com/nikhilbangre "nikhilbangre (1 commits)")[![ravindralande](https://avatars.githubusercontent.com/u/12871362?v=4)](https://github.com/ravindralande "ravindralande (1 commits)")

---

Tags

laravellaravel-authoritylaravel-authorizationlaravel-frameworklaravel-packagelaravel-routesmiddlewarelaravelsecurityAuthenticationauthorityauthorizationaclpermissionlaravel 5Laravel 5.1rolelaravel 5.4Laravel 5.2laravel 5.3laravel 5.5Laravel 5.6laravel 5.7abilitycancancanallowdenyroutes authorizationlaravel routes authority

### Embed Badge

![Health badge](/badges/livelyworks-laravel-yes-authority/health.svg)

```
[![Health](https://phpackages.com/badges/livelyworks-laravel-yes-authority/health.svg)](https://phpackages.com/packages/livelyworks-laravel-yes-authority)
```

###  Alternatives

[efficiently/authority-controller

AuthorityController is an PHP authorization library for Laravel 5 which restricts what resources a given user is allowed to access.

15433.2k](/packages/efficiently-authority-controller)[hosseinhezami/laravel-permission-manager

Advanced permission manager for Laravel.

393.1k](/packages/hosseinhezami-laravel-permission-manager)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12

6641.4k1](/packages/hasinhayder-tyro)[dlnsk/h-rbac

Based on native Laravel's gates and policies. Hierarchical RBAC with callbacks.

378.3k](/packages/dlnsk-h-rbac)

PHPackages © 2026

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