PHPackages                             starfolksoftware/persona - 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. starfolksoftware/persona

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

starfolksoftware/persona
========================

A simple and straightforward Laravel user permissions package.

v1.0.2(3y ago)23.1k[3 PRs](https://github.com/starfolksoftware/persona/pulls)MITPHPPHP ^8.1

Since Apr 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/starfolksoftware/persona)[ Packagist](https://packagist.org/packages/starfolksoftware/persona)[ Docs](https://github.com/starfolksoftware/persona)[ RSS](/packages/starfolksoftware-persona/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (11)Versions (8)Used By (0)

[![Logo Kalibrant](https://user-images.githubusercontent.com/4984175/162582621-80d3d4ec-83c8-4614-b429-e893af474ce9.png)](https://user-images.githubusercontent.com/4984175/162582621-80d3d4ec-83c8-4614-b429-e893af474ce9.png)

[![run-tests](https://github.com/starfolksoftware/persona/actions/workflows/run-tests.yml/badge.svg)](https://github.com/starfolksoftware/persona/actions/workflows/run-tests.yml)[![Check & fix styling](https://github.com/starfolksoftware/persona/actions/workflows/php-cs-fixer.yml/badge.svg)](https://github.com/starfolksoftware/persona/actions/workflows/php-cs-fixer.yml)[![PHPStan](https://github.com/starfolksoftware/persona/actions/workflows/phpstan.yml/badge.svg)](https://github.com/starfolksoftware/persona/actions/workflows/phpstan.yml)[![Update Changelog](https://github.com/starfolksoftware/persona/actions/workflows/update-changelog.yml/badge.svg)](https://github.com/starfolksoftware/persona/actions/workflows/update-changelog.yml)[![Total Downloads](https://camo.githubusercontent.com/887404b642a4795158a149eda8a164264a9d81d7a457a3e24cac890943de357b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746172666f6c6b736f6674776172652f706572736f6e61)](https://packagist.org/packages/starfolksoftware/persona)[![Latest Stable Version](https://camo.githubusercontent.com/c1320910e64c484aa6d1a4746efa67282ffcadaf5b3216c0528a5aaefd65e72f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746172666f6c6b736f6674776172652f706572736f6e61)](https://packagist.org/packages/starfolksoftware/persona)[![License](https://camo.githubusercontent.com/219160f7fbacf47a98cb6a0483714280d8c8823842e94d0c6b73aa1272aeaaf8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73746172666f6c6b736f6674776172652f706572736f6e61)](https://packagist.org/packages/starfolksoftware/persona)

Introduction
============

[](#introduction)

A simple, elagant and straight-foward user permissions package for your Laravel applications.

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

[](#installation)

You can install the package via composer:

```
composer require starfolksoftware/persona
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="persona-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="persona-config"
```

This is the contents of the published config file:

```
return [
    'roles' => [
        // 'owner' => [
        //     'key' => 'owner',
        //     'name' => 'Owner',
        //     'permissions' => ['*'],
        // ],
    ],
];
```

Usage
-----

[](#usage)

Add the `HasRole` trait to your user model:

```
use StarfolkSoftware\Persona\HasRole;

class User extends Authenticatable
{
    use HasRole;

    // ...
}
```

Register your roles and permissions in the config file:

```
return [
    'roles' => [
        'owner' => [
            'key' => 'owner', // must be unique
            'name' => 'Owner',
            'permissions' => ['*'],
        ],
    ],
];
```

You can check if a user has a particular permission as in the following:

```
$user->hasPermission('post:edit');
```

Giving the `permissions` key the value `'*'` means the `hasPermission(...)` method will always return 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](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Faruk Nasir](https://github.com/frknasir)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~156 days

Total

3

Last Release

1130d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f609ab7be5e5a0089c8a3a52861fc379fd2038adb1190e0524c5f46a900fcf0?d=identicon)[starfolksoftware](/maintainers/starfolksoftware)

---

Top Contributors

[![frknasir](https://avatars.githubusercontent.com/u/4984175?v=4)](https://github.com/frknasir "frknasir (15 commits)")

---

Tags

laravelPersonastarfolksoftware

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/starfolksoftware-persona/health.svg)

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

###  Alternatives

[caresome/filament-auth-designer

Transform Filament's default auth pages into stunning, brand-ready experiences

3711.7k1](/packages/caresome-filament-auth-designer)

PHPackages © 2026

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