PHPackages                             apachish/access-level - 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. apachish/access-level

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

apachish/access-level
=====================

Authentication performed by JWT Have three levels of admin, author and user access The list should only be created by the author admin Each admin has the ability to edit and delete the entire list and each author only has the ability to edit their own list Have an address to display the list to all users There is a section with the possibility of sending emails to all users.

0.1(4y ago)00Apache LicensePHPPHP ^7.3|^8.0

Since Aug 13Pushed 4y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

access-level
============

[](#access-level)

Authentication performed by JWT Have three levels of admin, author and user access The list should only be created by the author admin Each admin has the ability to edit and delete the entire list and each author only has the ability to edit their own list Have an address to display the list to all users There is a section with the possibility of sending emails to all users

install package

```
composer require apachish/access-level

```

after install run command install table in database

```
php artisan migrate

```

\##config

config laravel in file *./config/auth.php*

Change the following parameters in the corresponding file

```
    'defaults' => [
        'guard' => 'api',
        'passwords' => 'users',
    ],
    'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],

        'api' => [
            'driver' => 'jwt',
            'provider' => 'users',
            'hash' => false,
        ],
    ],
        'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => \Apachish\AccessLevel\Models\User::class,
        ],

        // 'users' => [
        //     'driver' => 'database',
        //     'table' => 'users',
        // ],
    ],

```

I have included a helper command to generate a key for you:

```
php artisan jwt:secret

```

you can create admin by set email in .env parmter `ADMIN_USER_EMAIL`

for create role admin and author and set user admin run command ,The following command

```
php artisan db:seed --class="Apachish\AccessLevel\Database\Seeds\RoleSeeder"

```

\##list api

To register a user:

header request

```
Accept: application/json
Content-type: application/json

```

body request

```
{
    "name":"shahriar",
    "email":"apachish@gmail.com",
    "password":"12345678",
    "password_confirmation":"12345678"
}

```

resulte request

```
{
    "status": "Success",
    "meta": {
        "code": 200,
        "message": "با موفقیت انجام گردید"
    },
    "data": {
        "user": {
            "id": 2,
            "name": "shahriar",
            "email": "apachish@gmail.com"
        }
    }
}

```

To login a user

header request

```
Accept: application/json
Content-type: application/json

```

body request

```
{
    "email":"apachish@gmail.com",
    "password":"12345678"
}

```

resulte

```
{
    "status": "Success",
    "meta": {
        "code": 200,
        "message": "با موفقیت انجام گردید"
    },
    "data": {
        "items": {
            "id": 2,
            "name": "shahriar",
            "email": "apachish@gmail.com"
        },
        "token_detiles": {
            "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjcuMC4wLjE6ODAwMFwvYXBpXC91c2VyXC9sb2dpbiIsImlhdCI6MTYyODc5NTgyOSwiZXhwIjoxNjI4Nzk5NDI5LCJuYmYiOjE2Mjg3OTU4MjksImp0aSI6IlpRZmx1aldkYkFUeVdINWoiLCJzdWIiOjIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.WlEud3yTwVlhYr6YdJQt95b3968A_hqFoz_16b3Hhuk",
            "token_type": "bearer",
            "expires_in": 3600
        }
    }
}

```

all aunder api use header :

```
Accept: application/json
Content-type: application/json
Authorization:Bearer {{access_token}}

```

add user for author use api :

list api [![img.png](img.png)](img.png)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

1730d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54353f44063ca1c991133d9ce8cc3c429ebbee2f82df630202996f1a65de4091?d=identicon)[apachish](/maintainers/apachish)

---

Top Contributors

[![apachish](https://avatars.githubusercontent.com/u/6897327?v=4)](https://github.com/apachish "apachish (7 commits)")

---

Tags

jwtauthAuthenticationauthorization

### Embed Badge

![Health badge](/badges/apachish-access-level/health.svg)

```
[![Health](https://phpackages.com/badges/apachish-access-level/health.svg)](https://phpackages.com/packages/apachish-access-level)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M344](/packages/tymon-jwt-auth)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M67](/packages/auth0-auth0-php)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

128738.1k](/packages/auth0-symfony)[auth0/wordpress

WordPress Plugin for Auth0

17419.5k](/packages/auth0-wordpress)

PHPackages © 2026

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