PHPackages                             wijzijnweb/laravel-inertia-permissions - 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. wijzijnweb/laravel-inertia-permissions

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

wijzijnweb/laravel-inertia-permissions
======================================

Easy to use package to implement Spatie's Permissions package into Inertia Laravel projects.

v1.0.8(5mo ago)193.9k↓20%3[1 PRs](https://github.com/wijzijnweb/laravel-inertia-permissions/pulls)MITPHPPHP ^8.1CI passing

Since Dec 14Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/wijzijnweb/laravel-inertia-permissions)[ Packagist](https://packagist.org/packages/wijzijnweb/laravel-inertia-permissions)[ Docs](https://github.com/wijzijnweb/laravel-inertia-permissions)[ RSS](/packages/wijzijnweb-laravel-inertia-permissions/feed)WikiDiscussions main Synced 1mo ago

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

Implementing Spatie's Permissions package into Inertia Laravel project.
=======================================================================

[](#implementing-spaties-permissions-package-into-inertia-laravel-project)

Easy to use package to implement Spatie's Permissions package into Inertia Laravel project. The package also includes a Vue components to display and edit the roles of the current user and to manage roles and permissions.

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

[](#installation)

You can install the package via composer:

```
composer require wijzijnweb/laravel-inertia-permissions
```

You can publish and run the migrations with

```
php artisan migrate
```

Add the following to your vite.config.js file

```
resolve: {
    alias: {
        '@laravel-inertia-permissions': 'vendor/wijzijnweb/laravel-inertia-permissions/resources/js'
    }
}
```

Optionally, you can add the following to your jsconfig.json file:

```
{
    "compilerOptions": {
        "paths": {
            "@laravel-inertia-permissions/*": ["./vendor/wijzijnweb/laravel-inertia-permissions/resources/js/*"]
        }
    }
}
```

Usage
-----

[](#usage)

Permissions and Roles are automatically Shared with Inertia. You can access them in your Vue components like this:

```
import usePermissions from '@laravel-inertia-permissions/Uses/usePermissions.js';

const { can, is } = usePermissions()

if (can('edit articles')) {
    // do something
}

if (is('writer')) {
    // do something
}
```

```
import FormRoles from '@laravel-inertia-permissions/Components/FormRoles.vue';
import FormPermissions from '@laravel-inertia-permissions/Components/FormPermissions.vue';

```

You can also use the directives to hide specific elements. To that you need to register the directives in your app.js file:

```
import {
    hasRoleDirective,
    hasPermissionDirective
} from '@laravel-inertia-permissions/Directives/permissionDirective.js';

createApp({render: () => h(App, props)})
    .directive('hasRole', hasRoleDirective)
    .directive('hasPermission', hasPermissionDirective)
```

After that you can use the directives in your Vue components: You can use the pipe symbol and the ampersand to check for multiple roles or permissions:

```

```

There is also a component to prevent the user from seeing something with a feedback message:

```
import HasPermission from '@laravel-inertia-permissions/Components/HasPermission.vue';

    You can edit articles

```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Wij zijn WEB](https://github.com/wijzijnweb)

License
-------

[](#license)

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

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance70

Regular maintenance activity

Popularity32

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% 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 ~89 days

Recently: every ~169 days

Total

9

Last Release

176d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cb67db04f60f5bf379aed4f568428648b364797d1254e1732f8812106c00ab4?d=identicon)[exapps](/maintainers/exapps)

---

Top Contributors

[![wijzijnweb](https://avatars.githubusercontent.com/u/79093089?v=4)](https://github.com/wijzijnweb "wijzijnweb (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![DannyHageman](https://avatars.githubusercontent.com/u/48557943?v=4)](https://github.com/DannyHageman "DannyHageman (1 commits)")

---

Tags

spatielaravelrolespermissionsinertiajs

### Embed Badge

![Health badge](/badges/wijzijnweb-laravel-inertia-permissions/health.svg)

```
[![Health](https://phpackages.com/badges/wijzijnweb-laravel-inertia-permissions/health.svg)](https://phpackages.com/packages/wijzijnweb-laravel-inertia-permissions)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[chiiya/filament-access-control

Admin user, role and permission management for Laravel Filament

21847.2k](/packages/chiiya-filament-access-control)[sametsahindogan/laravel-jwtredis

This package allows JWT-authenticated users to be stored and management in Redis with their roles, permissions, statuses and anything you want.

1221.9k](/packages/sametsahindogan-laravel-jwtredis)

PHPackages © 2026

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