PHPackages                             inoplate/abilities - 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. [Database &amp; ORM](/categories/database)
4. /
5. inoplate/abilities

ActiveComposer[Database &amp; ORM](/categories/database)

inoplate/abilities
==================

A laravel package to manage user abilities

v0.0.3(9y ago)223MITPHP

Since Aug 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/inoplate/abilities)[ Packagist](https://packagist.org/packages/inoplate/abilities)[ RSS](/packages/inoplate-abilities/feed)WikiDiscussions master Synced today

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

Inoplate abilities loader
-------------------------

[](#inoplate-abilities-loader)

Inoplate abilities loader is a laravel package to load and check abilities from database.

Instalation
-----------

[](#instalation)

> composer install inoplate/abilities

Usage
-----

[](#usage)

Before we can use this package, we must follow several step below.

1. Add ***Inoplate\\Abilities\\AbilitiesServiceProvider*** to our providers configuration.
2. Replate providers for ***Illuminate\\Auth\\AuthServiceProvider*** with ***Inoplate\\Abilities\\AuthServiceProvider***

To register abilities, we can extend BootstrapServiceProvider that shipped with this package. Define availabe abilities in the **getAbilities** method

```
    use Inoplate\Abilities\BootstrapServiceProvider as BaseProvider;

    class BootstrapServiceProvider extends BaseProvider
    {
        protected function getAbilities()
        {
            // Abilities are developer defined entity. Yess!
            // You must define abilities that are available for checking
            return ['create-post', 'update-post', 'delete-post'];
        }
    }
```

This package shipped with default migrations. You can publish and use it or use something else based with what you need. This package also shipped with **User** and **Role** model that has abilities property. And again you are free to use it or not. (User an Role are N:N in relationship)

```
    $user->abilities; // Retrieve user abilities
    $user->roles->abilities; // Retrieve user specific role abilities

    // To assign abilities, use Role.
    // Unfortunately, we can't set abilities directly to user at the moment.
    // NOTE! Abilities assignment will override existing abilities.

    $role = Role::find(1);
    $role->abilities = ['new-abilities'];
    $role->save();
```

Every time we check ability like **$user-&gt;can('create-post')** or **Gate::allows('create-post')**, it will check the abilities that belongs to User.

Policy is a resource based check, we can use it as usual.

**Please Note.**

1. If you use custom Gate checker, there will be one additional parameters that is **ability** to check.

**Running the tests**

> vendor/bin/phpunit

**Contribution**

Thank you for considering contributing to the this package. Just create pull request to and elaborate your purpose. We can discuss about the coding standart, branching strategy, etc.

**License**

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity56

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

Every ~3 days

Total

3

Last Release

3591d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3146109?v=4)[Mohammad Roseffendi](/maintainers/roseffendi)[@roseffendi](https://github.com/roseffendi)

---

Tags

configdatabaseauthorizationabilities

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/inoplate-abilities/health.svg)

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

###  Alternatives

[laravel-doctrine/acl

ACL for Laravel and Doctrine

44464.5k7](/packages/laravel-doctrine-acl)[arcanedev/laravel-settings

This package allows you to persists configs/settings for Laravel projects.

74136.5k6](/packages/arcanedev-laravel-settings)[aplus/config

Aplus Framework Config Library

171.6M3](/packages/aplus-config)[cornford/setter

An easy way to integrate Database Settings with Laravel.

131.0k](/packages/cornford-setter)

PHPackages © 2026

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