PHPackages                             i74ifa/role-craft - 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. i74ifa/role-craft

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

i74ifa/role-craft
=================

automating role creation and permission management with Spatie/Laravel-Permission.

v2.0.1(1mo ago)4181MITPHPPHP ^8.4

Since Jan 28Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/i74ifa/role-craft)[ Packagist](https://packagist.org/packages/i74ifa/role-craft)[ Docs](https://github.com/i74ifa/role-craft)[ RSS](/packages/i74ifa-role-craft/feed)WikiDiscussions main Synced 1mo ago

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

Role-Craft for spatie/laravel-permission
========================================

[](#role-craft-for-spatielaravel-permission)

[![Latest Version on Packagist](https://camo.githubusercontent.com/70d5def4896f6e93239c4a47ea1dd2681fc57f57a3ae602675d394368984fbd7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6937346966612f726f6c652d63726166742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/i74ifa/role-craft)[![Total Downloads](https://camo.githubusercontent.com/06ae82870b0406fa1afa373d2bc9a872e0cb7788db81736a8d96d699c46d8238/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6937346966612f726f6c652d63726166742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/i74ifa/role-craft)[![GitHub Actions](https://github.com/i74ifa/role-craft/actions/workflows/main.yml/badge.svg)](https://github.com/i74ifa/role-craft/actions/workflows/main.yml/badge.svg)

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

[](#installation)

```
composer require i74ifa/role-craft
```

Version Compatibility
---------------------

[](#version-compatibility)

VersionLaravelSpatie PermissionPHP**v2.x**12.0+ / 13.0+7.0+8.4+**v1.x**10.0+ / 11.0+6.x8.2+### optional

[](#optional)

publish config

```
php artisan vendor:publish --tag=role-craft-config
```

Usage
-----

[](#usage)

### Generate role and Permissions

[](#generate-role-and-permissions)

```
php artisan role-craft:generate
```

this command will be generate all permissions and `role-craft.default_role` will be created if you want to change default role name, you can change it in config/role-craft.php after publish config

### Sync permissions

[](#sync-permissions)

```
php artisan role-craft:sync manager --all
```

this will be sync all permissions to `manager` role if it exists if not exists you want to use `--create` option

```
php artisan role-craft:sync manager --create
```

if you want to sync some role from models use `--models` option

```
php artisan role-craft:sync manager --models=User --models=Post

# OR Custom Directory
php artisan role-craft:sync manager --models=App\Models\Directory\User
```

Generate role if not exists

```
php artisan role-craft:sync manager --create
```

License
-------

[](#license)

This package is released under the [MIT license](https://github.com/i74ifa/role-craft/blob/main/LICENSE).

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~53 days

Recently: every ~78 days

Total

9

Last Release

49d ago

Major Versions

v1.1.4 → v2.0.02026-03-28

PHP version history (4 changes)1.0.0PHP ^8.2

1.0.1PHP ^8.1

1.0.3PHP ^8.3

v2.0.1PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/1703357a40c48453eeb972fd2297ed8b545fa001843f863c43443c137f220150?d=identicon)[74ifa](/maintainers/74ifa)

---

Top Contributors

[![i74ifa](https://avatars.githubusercontent.com/u/69402911?v=4)](https://github.com/i74ifa "i74ifa (15 commits)")[![hothaifadev](https://avatars.githubusercontent.com/u/139741620?v=4)](https://github.com/hothaifadev "hothaifadev (3 commits)")

---

Tags

spatielaravelpermissionrolelaravel-permissioni74ifarole-craft

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/i74ifa-role-craft/health.svg)

```
[![Health](https://phpackages.com/badges/i74ifa-role-craft/health.svg)](https://phpackages.com/packages/i74ifa-role-craft)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[sereny/nova-permissions

Laravel Nova - Roles &amp; Permissions

86388.6k1](/packages/sereny-nova-permissions)[insenseanalytics/laravel-nova-permission

A Laravel Nova tool for Spatie's Permission library.

7549.0k](/packages/insenseanalytics-laravel-nova-permission)

PHPackages © 2026

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