PHPackages                             bigfive-edition/laravel-bfe-permission - 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. bigfive-edition/laravel-bfe-permission

ActiveLibrary[Framework](/categories/framework)

bigfive-edition/laravel-bfe-permission
======================================

A library for big five to manage permissions

1.0.46(2y ago)0361MITPHPPHP ^8.0|^8.1

Since Feb 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bigfive-edition/laravel-bfe-permission)[ Packagist](https://packagist.org/packages/bigfive-edition/laravel-bfe-permission)[ RSS](/packages/bigfive-edition-laravel-bfe-permission/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (49)Used By (0)

BFE Permissions
===============

[](#bfe-permissions)

Documentation, Installation, and Usage Instructions
---------------------------------------------------

[](#documentation-installation-and-usage-instructions)

To get started with using the package, we'll install it using the following command:

add the private repository in your composer.json file

```
"repositories": [
	{
		"type": "vcs",
		"url": "git@gitlab.bfedition.com:bigcity/bigcity-instances/bigfiveedition-laravel-permission.git"
	}
],
```

```
composer require bigfive-edition/laravel-bfe-permission
```

Now that we've installed the package, we'll need to publish the database migration and config file:

```
php artisan bfe-permission:install
```

We can now run the migrations to create the new tables in our database:

```
php artisan migrate
```

Assuming that we are using the default config values and haven't changed anything in the package's config/bfe-permission.php, we should now have five new tables in our database:

We can also generate the default

```
php artisan bfe-permission:generate-teams
php artisan bfe-permission:generate-roles
php artisan bfe-permission:generate-abilities
```

Http Routes
-----------

[](#http-routes)

it comes with default routes for managing team, roles, and abilities check the postman collection

```
{routes_prefix}/bfe-permissions/teams
{routes_prefix}/bfe-permissions/teams/{team_id}/models

{routes_prefix}/bfe-permissions/roles
{routes_prefix}/bfe-permissions/roles/{role_id}/models

{routes_prefix}/bfe-permissions/abilities
{routes_prefix}/bfe-permissions/abilities/{ability_id}/models

```

Http Route Middlewares
----------------------

[](#http-route-middlewares)

Adding routes middlewares as follow. Note that the `|` is for OR operations and the `&` is for AND operations

```
bfe-permission.teams:waiters|managers
bfe-permission.teams:waiters&managers

bfe-permission.roles:admin|system_admin
bfe-permission.roles:admin&system_admin

bfe-permission.abilities:read_all_users|create_one_vehicle
bfe-permission.abilities:read_all_users&create_one_vehicle
bfe-permission.abilities:read_all_users|create_one_vehicle,{resource_class},{resource_id}
bfe-permission.abilities:read_all_users&create_one_vehicle,{resource_class},{resource_id}

```

Gates and Policies \[refer to \]
----------------------------------------------------------------------------

[](#gates-and-policies-refer-to-httpslaravelcomdocs9xauthorization)

Here are the predefined abilities beside the ones autogenerated and managed by admin in `bfe_permission_abilities` table

`bfe-permission-belongs-teams`: checks if the user belongs to passed teams

```
Gate::allows('bfe-permission-belongs-teams', 'admin')
Gate::forUser($user)->allows('bfe-permission-belongs-teams', 'admin | manager')
Gate::forUser($user)->allows('bfe-permission-belongs-teams', 'admin & manager')

```

`bfe-permission-has-roles`: checks if the user has passed roles

```
Gate::allows('bfe-permission-has-roles', 'admin')
Gate::forUser($user)->allows('bfe-permission-has-roles', 'admin | waiter')
Gate::forUser($user)->allows('bfe-permission-has-roles', 'admin & waiter')

```

`bfe-permission-has-abilities`: checks if the user has passed abilities on passed resource

```
Gate::allows('bfe-permission-has-abilities', 'create_user')
Gate::forUser($user)->allows('bfe-permission-has-abilities', 'create_user | delete_user')
Gate::forUser($user)->allows('bfe-permission-has-abilities', 'create_user & delete_user')
Gate::forUser($user)->allows('bfe-permission-has-abilities', ['create_user | delete_user', $resourceObject])
Gate::forUser($user)->allows('bfe-permission-has-abilities', ['create_user & delete_user', $resourceObject])

```

`ability-name`: checks if the user has ability on passed resource

```
Gate::allows('ability-name')
Gate::forUser($user)->allows('ability-name', $resourceObject)

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 98% 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 ~8 days

Total

47

Last Release

813d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4932828f5c20d4488c803465a15ca90a400d9270d11fb9b18f096543e7a66b5f?d=identicon)[ureymutuale](/maintainers/ureymutuale)

---

Top Contributors

[![ureymutuale](https://avatars.githubusercontent.com/u/3835222?v=4)](https://github.com/ureymutuale "ureymutuale (98 commits)")[![omar-bfe](https://avatars.githubusercontent.com/u/33864180?v=4)](https://github.com/omar-bfe "omar-bfe (2 commits)")

---

Tags

frameworklaravelpermission

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bigfive-edition-laravel-bfe-permission/health.svg)

```
[![Health](https://phpackages.com/badges/bigfive-edition-laravel-bfe-permission/health.svg)](https://phpackages.com/packages/bigfive-edition-laravel-bfe-permission)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/lumen-framework

The Laravel Lumen Framework.

1.5k26.2M709](/packages/laravel-lumen-framework)[laravel/pennant

A simple, lightweight library for managing feature flags.

57311.1M53](/packages/laravel-pennant)[rebing/graphql-laravel

Laravel wrapper for PHP GraphQL

2.2k7.1M26](/packages/rebing-graphql-laravel)

PHPackages © 2026

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