PHPackages                             orchid/access - 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. [Framework](/categories/framework)
4. /
5. orchid/access

AbandonedArchivedLibrary[Framework](/categories/framework)

orchid/access
=============

Role based access control package from Laravel Framework.

1.0.1(10y ago)0419MITPHPPHP &gt;=5.5.9

Since Dec 7Pushed 10y ago1 watchersCompare

[ Source](https://github.com/legacy-orchid/Access)[ Packagist](https://packagist.org/packages/orchid/access)[ RSS](/packages/orchid-access/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

Access
------

[](#access)

Role based access control package from Laravel

[![Latest Stable Version](https://camo.githubusercontent.com/bd563846db4ee8d0a7c8aea9c8a912e807fc11730882be45dd9c38d091521b06/68747470733a2f2f706f7365722e707567782e6f72672f6f72636869642f6163636573732f762f737461626c65)](https://packagist.org/packages/orchid/access)[![Total Downloads](https://camo.githubusercontent.com/a8c80a086c0a2fe2a1e7732693f42a73b77aaadded2bc50e38a064c1628375ff/68747470733a2f2f706f7365722e707567782e6f72672f6f72636869642f6163636573732f646f776e6c6f616473)](https://packagist.org/packages/orchid/access)[![License](https://camo.githubusercontent.com/0e1bb554377a212237eb7dce4bcb03d8d39ec1161245f2f5dd2f51f9e8713000/68747470733a2f2f706f7365722e707567782e6f72672f6f72636869642f6163636573732f6c6963656e7365)](https://packagist.org/packages/orchid/access)

Installation
------------

[](#installation)

1. install package

    ```
    composer require orchid/access
    ```
2. edit config/app.php

    service provider :

    ```
     Orchid\Access\Providers\SettingsServiceProvider::class
    ```
3. create user\\roles table

    ```
    php artisan vendor:publish
    php artisan migrate
    ```

Usage
-----

[](#usage)

```
/**
* User
*/

use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Database\Eloquent\Model;
use Orchid\Access\Traits\UserAccess;

class User extends Model implements AuthenticatableContract, CanResetPasswordContract
{

    use Authenticatable, CanResetPassword, UserAccess;

    /**
     * @var
     */
    protected static $rolesModel = Roles::class;

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'users';

    /**
     * @var array
     */
    protected $fillable = [
        'email',
        'permissions',
    ];

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = [
        'password',
        'remember_token',
    ];

}

// It checks the availability of a user in the roles and permissions
Auth:user()->hasAccess('param');

// Get access for the user
Auth:user()->getPermissionsAttribute($permissions);

// Set access for the user
Auth:user()->setPermissionsAttribute($permissions)

// Get roles for the user
Auth:user()->getRoles();

// Check user has role
Auth:user()->inRole($role)

// Add Role for user
Auth:user()->addRole($role)
```

```
/**
* Middleware
*/

// To check on each controller add middleware in /Http/Kernel.php
        'Access'     => \Orchid\Access\Middleware\AccessMiddleware::class,
```

```
/**
* Role
*/

// Model Role

use Illuminate\Database\Eloquent\Model;
use Orchid\Access\Traits\RoleAccess;

class Roles extends Model
{

    use RoleAccess;

    /**
     * @var
     */
    protected static $usersModel = User::class;

    /**
     * @var string
     */
    protected $table = 'roles';

    /**
     * @var array
     */
    protected $fillable = [
        'id',
        'name',
        'slug',
        'permissions',
    ];

}

$role = Role::getRoleSlug('string');

// Will return all users with that role
$role->getUsers();

// Get access for the role
$role->getPermissionsAttribute($permissions);

// Set access for the role
$role->setPermissionsAttribute($permissions);

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~3 days

Total

3

Last Release

3851d ago

Major Versions

0.0.1 → 1.0.02015-12-13

### Community

Maintainers

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

---

Top Contributors

[![tabuna](https://avatars.githubusercontent.com/u/5102591?v=4)](https://github.com/tabuna "tabuna (14 commits)")

---

Tags

frameworklaravelaccessrolesrbac

### Embed Badge

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

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

###  Alternatives

[laravel/laravel

The skeleton application for the Laravel framework.

84.5k63.2M1.0k](/packages/laravel-laravel)[unopim/unopim

UnoPim Laravel PIM

10.5k2.2k](/packages/unopim-unopim)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3911.7k](/packages/codewithdennis-larament)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11914.4k42](/packages/kompo-kompo)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)

PHPackages © 2026

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