PHPackages                             solarios/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. solarios/permission

ActiveLibrary

solarios/permission
===================

Permissions for Laravel 5.6

0.1(8y ago)113MITPHPPHP ^7.1

Since May 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Solarios/Permission)[ Packagist](https://packagist.org/packages/solarios/permission)[ RSS](/packages/solarios-permission/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Solarios Permission
===================

[](#solarios-permission)

A very simple permission package for Laravel 5.6. Includes roles and permissions.

You can install the package via composer:

```
composer require solarios/permission
```

Because Laravel &gt;= 5.5 uses auto-disover, the service provider will automatically register. If you want to include it manually, do so in the `config/app.php` file.

```
'providers' => [
    // ...
    Solarios\Permission\PermissionServiceProvider::class,
];
```

Usage
-----

[](#usage)

The packages comes with 2 traits:

- HasPermissions
- HasRoles

### HasPermissions

[](#haspermissions)

The `hasPermissionTo()` method checks if the model has a permission. If the model also uses roles, it will also check the role for the permission.

```
$user->givePermissionTo('manage users');

$user->hasPermissionTo('manage users');
// Returns: true
```

Or when there is a role 'admin' with the 'manage users' permission:

```
$user->giveRole('admin');
// The admin role has the 'manage users' permission.

$role->hasPermissionTo('manage users');
// Returns: true
```

**Remove a permission**

```
$user->revokePermissionTo('manage users');
```

### Hasroles

[](#hasroles)

Use this trait to give a model roles.

```
$user->giveRole('editor');

$user->hasRole('editor');
// Returns: true
```

**Remove a role**

```
$user->revokeRole('editor');
```

### Relations

[](#relations)

Roles and permissions both have a polymorphic relation so we are not bound to one (user) model.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2936d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e20fb73bc422fb9400387e95bee5be5c8473914f232c15bdd82033f8bf1c6cd?d=identicon)[dastin](/maintainers/dastin)

### Embed Badge

![Health badge](/badges/solarios-permission/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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