PHPackages                             juliocosta/lara-auth - 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. juliocosta/lara-auth

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

juliocosta/lara-auth
====================

Sanctum Auth ACL

39PHP

Since Jun 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/JCostaa/sanctum-acl-api)[ Packagist](https://packagist.org/packages/juliocosta/lara-auth)[ RSS](/packages/juliocosta-lara-auth/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Sanctum Auth ACL
================

[](#sanctum-auth-acl)

Sacuntum Auth ACL is a Laravel package to authentication and authorization package.

The middleware `has.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

Install
-------

[](#install)

- Install packaqe with composer `composer require juliocosta/lara-auth`
- Publish seeder `php artisan vendor:publish --force --tag auth-seeds`
- Add `has.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

```
use Laravel\Sanctum\HasApiTokens;

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

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

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/57916495?v=4)[JCostaa](/maintainers/JCostaa)[@JCostaa](https://github.com/JCostaa)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/juliocosta-lara-auth/health.svg)

```
[![Health](https://phpackages.com/badges/juliocosta-lara-auth/health.svg)](https://phpackages.com/packages/juliocosta-lara-auth)
```

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