PHPackages                             ihabafia/permissions-admin - 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. ihabafia/permissions-admin

ActiveLibrary

ihabafia/permissions-admin
==========================

This package for an admin of Spatie Laravel Permission package

1.0.1(2y ago)325[4 PRs](https://github.com/Ihabafia/permissions-admin/pulls)MITBladePHP ^8.2CI passing

Since May 7Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Ihabafia/permissions-admin)[ Packagist](https://packagist.org/packages/ihabafia/permissions-admin)[ Docs](https://github.com/ihabafia/permissions-admin)[ GitHub Sponsors](https://github.com/ihabafia)[ RSS](/packages/ihabafia-permissions-admin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (16)Versions (8)Used By (0)

This package for an admin of Spatie Laravel Permission package
==============================================================

[](#this-package-for-an-admin-of-spatie-laravel-permission-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/67f299aef2294ca4c0c6a5cd723314e886de66218ec19fefddb0f4cdf7695aa9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69686162616669612f7065726d697373696f6e732d61646d696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ihabafia/permissions-admin)[![GitHub Tests Action Status](https://camo.githubusercontent.com/422c71285c7ae426382f01e3046a9e77e79b71b2aa480ced9ebaf2e294c09b2d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f69686162616669612f7065726d697373696f6e732d61646d696e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ihabafia/permissions-admin/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c941885bdfdaad6928c222ba6e8f0711956d6f1237fc36a3e60aaef73019bbc4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f69686162616669612f7065726d697373696f6e732d61646d696e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/ihabafia/permissions-admin/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/492d9f6aa9021f043378f17aa8df746f8ae75faf225b0bc9b844af90b83fff05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69686162616669612f7065726d697373696f6e732d61646d696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ihabafia/permissions-admin)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. This package is a cool livewire GUI for [Spatie Laravel Permission](https://github.com/spatie/laravel-permission) **(not included)**, and it will help you to:

- Create role.
- Create permission.
- Assign role to user.
- Give permission to role.
- Assign role to permission.
- Remove permission from role.

All this via 3 livewire components that will show you the information in a dynamic table which is searchable, sortable and filtered.

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

[](#installation)

You can install the package via composer:

```
composer require ihabafia/permissions-admin
```

### Additional Steps for installation

[](#additional-steps-for-installation)

1. This package is depend on [Spatie Laravel Permission](https://github.com/spatie/laravel-permission), to install it if you didn't already:

```
composer require spatie/laravel-permission
```

2. [Livewire](https://github.com/livewire/livewire) is required, to install it if you didn't already:

```
composer require livewire/livewire
```

3. You need to create and empty `App\Models\Role` and `App\Models\Permission` class and add `HasPermissionAdmin` trait as follows:

```
namespace App\Models;

use IhabAfia\PermissionsAdmin\Traits\HasPermissionAdmin;
use Spatie\Permission\Models\Role as SpatieRole;

class Role extends SpatieRole
{
    use HasPermissionAdmin;
}
```

```
namespace App\Models;

use IhabAfia\PermissionsAdmin\Traits\HasPermissionAdmin;
use Spatie\Permission\Models\Permission as SpatiePermission;

class Permission extends SpatiePermission
{
    use HasPermissionAdmin;
}
```

**These classes will not affect your application since these classes extends the original class.**

4. You need to add `HasPermissionAdmin` trait in your `User::class` like follows:

```
namespace App\Models;

use Spatie\Permission\Traits\HasRoles;
use IhabAfia\PermissionsAdmin\Traits\HasPermissionAdmin;

class User extends Authenticatable
{
    use HasRoles;
    use HasPermissionAdmin;
    ...
}
```

This trait is needed for adding the search functionality to the 3 models.

5. Finally, you need to use this route in `web.php`

```
Route::rolesPermissionsAdmin();
```

You might need to publish the config file to change default routes with your own:

```
php artisan vendor:publish --tag="permissions-admin-config"
```

Optionally but recommended, you can publish the views using the command bellow, to make sure you get the correct styling of all the component.

```
php artisan vendor:publish --tag="permissions-admin-views"
```

Testing
-------

[](#testing)

```
Need Help
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ihab Abou Afia](https://github.com/Ihabafia)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance60

Regular maintenance activity

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.9% 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 ~4 days

Total

2

Last Release

732d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15665ee846d7b15d3b6a8fc1c64cb5b51a4b1b565508d6914f396535765e364d?d=identicon)[Ihabafia](/maintainers/Ihabafia)

---

Top Contributors

[![Ihabafia](https://avatars.githubusercontent.com/u/6062692?v=4)](https://github.com/Ihabafia "Ihabafia (14 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

adminlaravellaravel-permissionlaravel-permissionslivewirepermissionphprolesecurespatie-laravel-permissionlaravelIhab Abou Afiapermissions-admin

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ihabafia-permissions-admin/health.svg)

```
[![Health](https://phpackages.com/badges/ihabafia-permissions-admin/health.svg)](https://phpackages.com/packages/ihabafia-permissions-admin)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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