PHPackages                             colbeh/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. [Database &amp; ORM](/categories/database)
4. /
5. colbeh/access

ActiveLaravel-package[Database &amp; ORM](/categories/database)

colbeh/access
=============

laravel package for role permission system

v1.1.6(10mo ago)01411MITPHP

Since Jun 26Pushed 10mo ago1 watchersCompare

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

READMEChangelog (4)DependenciesVersions (13)Used By (1)

Installation:
=============

[](#installation)

1- Composer require colbeh/access

2- Add config file

```
    php artisan vendor:publish --provider="Colbeh\Access\ServiceProvider"

```

3- Go to config/access\_colbeh and set your admin guard to check with permissions. by default uses default guard that sets in

```
auth.defaults.guard

```

4- Add this HasRoles trait to your admin Model.

```
     use HasRoles

```

5- Migrate

```
    php artisan migrate

```

6- Go to

```
    database/seeders/PermissionsSeeder

```

and add your permissions.

7- Seed your permissions

```
    php artisan db:seed --class=PermissionsSeeder

```

8- Go to App/Http/middleware/CheckPermission.php and add your conditions

9- add checkPermission to middleware kernel

Upgrade:
========

[](#upgrade)

```
    composer require colbeh/access:x.x.x

```

Usage
=====

[](#usage)

### Rules

[](#rules)

You can add your rules in

```
     App/Http/middleware/CheckPermission.php

```

for every controller and method

### Check with gate

[](#check-with-gate)

If you want to check one permission in blade, you can use "permission" guard

```
  @can('permission','root')
        {{-- has permission --}}
  @endcan
```

### Check with helper

[](#check-with-helper)

If you want to check one permission in code, you can use "hasAccess" method

```
    if(Access::hasPermission('root')){

        // access granted

    }else{

        // access denied
    }

```

### Roles and permissions add,edit

[](#roles-and-permissions-addedit)

Here is some function to add and edit roles and permissions:

```
   * getAdmin ($id)
   * getRole ($id)

   * roleStore ($name,$desc,$permissionIds)
   * roleUpdate ($roleId,$name,$desc,$permissionIds=null)
   * roleToggle ($adminId,$permissionId)  // toggle a role to admin
   * roleAttach ($adminId,$permissionId)  // add a role to admin
   * roleDetach ($adminId,$permissionId)  // remove a role from admin
   * rolesList()

   * permissionToggle ($roleId,$permissionId)  // toggle a permission to role
   * permissionAttach ($roleId,$permissionId)  // add a permission to role
   * permissionDetach ($roleId,$permissionId)  // remove a permission from role
   * permissionsList ($roleId=null)
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance54

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.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 ~133 days

Recently: every ~364 days

Total

12

Last Release

324d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca9372f5dafa9f9aac1d2a77aa9a411cca9204078b06cb1126ab8ebd2614bdb6?d=identicon)[sadeghbarout](/maintainers/sadeghbarout)

---

Top Contributors

[![sadeghbarout](https://avatars.githubusercontent.com/u/7033941?v=4)](https://github.com/sadeghbarout "sadeghbarout (10 commits)")[![armantaghiyan](https://avatars.githubusercontent.com/u/30866343?v=4)](https://github.com/armantaghiyan "armantaghiyan (4 commits)")

---

Tags

laravelmigrationrolespermissionsadmin

### Embed Badge

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

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

###  Alternatives

[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[kodeine/laravel-acl

Light-weight role-based permissions for Laravel 5 built in Auth system.

782354.8k5](/packages/kodeine-laravel-acl)[laravel-doctrine/acl

ACL for Laravel and Doctrine

44445.3k7](/packages/laravel-doctrine-acl)[smarch/watchtower

Front-end for the Shinboi Auth system of Users / Roles / Permissions in Laravel 5

523.0k](/packages/smarch-watchtower)

PHPackages © 2026

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