PHPackages                             zodexnl/spatie-permission-to-vue-inertia - 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. zodexnl/spatie-permission-to-vue-inertia

ActivePlugin

zodexnl/spatie-permission-to-vue-inertia
========================================

Use the Spatie permission package in Vue with Inertia

v1.0.1(3y ago)68.1k↓26.5%MITJavaScript

Since May 2Pushed 3y agoCompare

[ Source](https://github.com/ZodexNL/spatie-permission-to-vue-inertia)[ Packagist](https://packagist.org/packages/zodexnl/spatie-permission-to-vue-inertia)[ RSS](/packages/zodexnl-spatie-permission-to-vue-inertia/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Laravel permission to Vuejs
===========================

[](#laravel-permission-to-vuejs)

Inertia &amp; Vue3
------------------

[](#inertia--vue3)

This package is a fork of the package (ahmedsaoud31/laravel-permission-to-vuejs) and requires the [spatie-permission](https://github.com/spatie/laravel-permission) package.

The reason I made this fork is because in my projects i had to force reload my browser in order to see role and/or permission changes. You need to use Inertia &amp; Vue3 in order for this package to work.

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

[](#installation)

```
composer require zodexnl/spatie-permission-to-vue-inertia
```

Config
------

[](#config)

First, add the following trait to your `User` model:

```
use SpatiePermissionsToVueInertia\Traits\SpatiePermissionsToVue;

class User extends Authenticatable
{
    use SpatiePermissionsToVue;

}
```

Secondly, you want to add the `spatie-permission-to-vuejs` plugin in `app.js` file:

```
import LaravelPermissionToVueJS from "../../vendor/zodexnl/spatie-permission-to-vue-inertia/src/js;
import Vue from 'vue';

Vue.use(plugin);
Vue.use(LaravelPermissionToVueJS);
```

Last, you want to add the the follwing to HandleInertiaRequest.php:

```
public function share(Request $request)
{
    return array_merge(parent::share($request), [
        'permissions' => json_decode(auth()->check() ? auth()->user()->jsPermissions() : '{}', true),
    ]);
}
```

How to use
----------

[](#how-to-use)

You can use the following code in your project:

```

```

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.3% 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 ~13 days

Total

2

Last Release

1098d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75893390500cd4c516f7e7d17a075daa3afc4fdeecfebcd5d9bba5f884f9c2be?d=identicon)[ZodexNL](/maintainers/ZodexNL)

---

Top Contributors

[![ahmedsaoud31](https://avatars.githubusercontent.com/u/4484348?v=4)](https://github.com/ahmedsaoud31 "ahmedsaoud31 (41 commits)")[![Engveloper](https://avatars.githubusercontent.com/u/46981084?v=4)](https://github.com/Engveloper "Engveloper (1 commits)")[![ZodexNL](https://avatars.githubusercontent.com/u/70688906?v=4)](https://github.com/ZodexNL "ZodexNL (1 commits)")

### Embed Badge

![Health badge](/badges/zodexnl-spatie-permission-to-vue-inertia/health.svg)

```
[![Health](https://phpackages.com/badges/zodexnl-spatie-permission-to-vue-inertia/health.svg)](https://phpackages.com/packages/zodexnl-spatie-permission-to-vue-inertia)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[althinect/filament-spatie-roles-permissions

340954.7k9](/packages/althinect-filament-spatie-roles-permissions)[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.3k](/packages/typicms-base)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[binary-cats/laravel-rbac

Laravel enum-backed RBAC extension of spatie/laravel-permission

7730.4k](/packages/binary-cats-laravel-rbac)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1225.0k10](/packages/fleetbase-core-api)

PHPackages © 2026

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