PHPackages                             creode/permissions-seeder - 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. creode/permissions-seeder

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

creode/permissions-seeder
=========================

Exposes a simple permission seeder class that aids in creation of roles and permissions.

1.1.0(1y ago)0562MITPHPPHP ^8.1

Since Nov 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/creode-modules/permissions-seeder)[ Packagist](https://packagist.org/packages/creode/permissions-seeder)[ Docs](https://github.com/creode/permissions-seeder)[ RSS](/packages/creode-permissions-seeder/feed)WikiDiscussions 1.x Synced 2w ago

READMEChangelog (3)Dependencies (13)Versions (4)Used By (2)

Exposes a simple permission seeder class that aids in creation of roles and permissions.
========================================================================================

[](#exposes-a-simple-permission-seeder-class-that-aids-in-creation-of-roles-and-permissions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/35b8e6fa92ac3609731a4af56bbf954d8197d2a8c0fa270420081fdabc9d0264/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6372656f64652f7065726d697373696f6e732d7365656465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creode/permissions-seeder)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1989eb2440ab1fdd8c542f53a02b6924c4b3f7d34d1ce389843e518eb4f47344/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6372656f64652d6d6f64756c65732f7065726d697373696f6e732d7365656465722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/creode-modules/permissions-seeder/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d1df2ec710518d3e91d79b859e502251265cca81f6150e20ccbd5b1190d08382/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6372656f64652d6d6f64756c65732f7065726d697373696f6e732d7365656465722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/creode-modules/permissions-seeder/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/53ad8e7f865ed10352405c3422d6ca2d0556b092c1a5c66070c1c95653e63df3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6372656f64652f7065726d697373696f6e732d7365656465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creode/permissions-seeder)

Exposes a simple permission seeder class that aids in creation of roles and permissions.

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

[](#installation)

You can install the package via composer:

```
composer require creode/permissions-seeder
```

Usage
-----

[](#usage)

### The `getPermissions()` function

[](#the-getpermissions-function)

This is a function used to return an array of permissions to create. By default it uses the following but of course can be overridden in child classes.

```
protected function getPermissions(): array {
    return [
        'viewAny',
        'view',
        'update',
        'create',
        'delete',
        'destroy',
    ];
}
```

### The `getPermissionGroup()` function

[](#the-getpermissiongroup-function)

This is an abstract function used to determine the type of resource to create permissions for. It should return a string for example "Asset". This is used to be appended to the end of the permission name for instance "viewAnyAsset" or "deleteAsset". It also is used to determine the name of the role to create.

```
protected function getPermissionGroup(): string {
    return 'Asset';
}
```

### The getRoleName() function

[](#the-getrolename-function)

This is a function used to return the name of the role to create. By default it uses the following but of course can be overridden in child classes. It defaults to the following but can be overridden in child classes:

```
protected function getRoleName(): string {
    return strtolower($this->getPermissionGroup().'-manager');
}
```

### Properties

[](#properties)

This class exposes the following properties that can be used to override the default behaviour:

```
/** Determines if we should give super admin permissions to this group. */
protected $giveSuperAdminPermissions = true;

/** Determines if we should create a role for this group. */
protected $shouldCreateRole = true;
```

Testing
-------

[](#testing)

```
composer test
```

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)

- [Creode](https://github.com/creode)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.2% 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 ~118 days

Total

4

Last Release

662d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8133041?v=4)[Creode](/maintainers/creode)[@creode](https://github.com/creode)

---

Top Contributors

[![jaymeh](https://avatars.githubusercontent.com/u/18261676?v=4)](https://github.com/jaymeh "jaymeh (15 commits)")[![liam-spedding](https://avatars.githubusercontent.com/u/111750536?v=4)](https://github.com/liam-spedding "liam-spedding (2 commits)")

---

Tags

laravelcreodepermissions-seeder

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/creode-permissions-seeder/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

13.0k107.5M1.6k](/packages/spatie-laravel-permission)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[spatie/laravel-passkeys

Use passkeys in your Laravel app

4721.0M48](/packages/spatie-laravel-passkeys)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

46273.9k](/packages/harris21-laravel-fuse)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1614.1k4](/packages/masterix21-laravel-licensing)[waguilar33/filament-guardian

Role and permission management for Filament

175.2k](/packages/waguilar33-filament-guardian)

PHPackages © 2026

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