PHPackages                             diego-drese/valiria - 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. diego-drese/valiria

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

diego-drese/valiria
===================

Sanctum Auth ACL

02PHP

Since Jun 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/diego-drese/valiria)[ Packagist](https://packagist.org/packages/diego-drese/valiria)[ RSS](/packages/diego-drese-valiria/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Valíria Auth ACL
================

[](#valíria-auth-acl)

Valíria is a Laravel package to authentication and authorization package.

The middleware `val.acl` check if auth user is authorized to access the route and he is authorized when has permission with the same name of the route within any role he has

The name Valíria is based on Game Of Thrones
--------------------------------------------

[](#the-name-valíria-is-based-on-game-of-thrones)

Only the greatest smiths can reforge swords from existing Valirian steel, and the secret of creating such an alloy was apparently lost with Valíria, making these remaining weapons highly prized and extremely rare. Valirian steel blades in Westeros are precious relics of noble houses, each with its own name and history.

Install
-------

[](#install)

- Install packaqe with composer `composer require diego-drese/valiria`
- Publish seeder `php artisan vendor:publish --force --tag auth-seeds`
- Add `val.acl` on routes with that you wish check permissions
- Run php artisan vendor:publish --provider="Laravel\\Sanctum\\SanctumServiceProvider"
- Run php artisan migrate
- Run `php artisan db:seed --class=PermissionsTableSeeder` to populate permissions table

Use
---

[](#use)

- Add Sanctum's middleware to your api middleware group within your app/Http/Kernel.php file:
    cUrl

```
use Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful;

'api' => [
    EnsureFrontendRequestsAreStateful::class,
    'throttle:60,1',
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
],
```

- Add trait in User model, check if model User exists in app\\Model\\User.php

```
use Laravel\Sanctum\HasApiTokens;
use Valiria\Traits\ValiriaUser;

class User extends Authenticatable
{
    use HasApiTokens, Notifiable, ValiriaUser;
}
```

License
-------

[](#license)

The Valiria package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

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://avatars.githubusercontent.com/u/7375455?v=4)[Diego](/maintainers/diego-drese)[@diego-drese](https://github.com/diego-drese)

---

Top Contributors

[![diego-drese](https://avatars.githubusercontent.com/u/7375455?v=4)](https://github.com/diego-drese "diego-drese (3 commits)")

### Embed Badge

![Health badge](/badges/diego-drese-valiria/health.svg)

```
[![Health](https://phpackages.com/badges/diego-drese-valiria/health.svg)](https://phpackages.com/packages/diego-drese-valiria)
```

###  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)[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.2M119](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

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

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)

PHPackages © 2026

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