PHPackages                             tiaxter/laravel-permission-js - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tiaxter/laravel-permission-js

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tiaxter/laravel-permission-js
=============================

Check spatie/laravel-permission directly in JavaScript

v0.0.2(5y ago)5278↓25%MITPHP

Since Nov 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/tiaxter/laravel-permission-js)[ Packagist](https://packagist.org/packages/tiaxter/laravel-permission-js)[ RSS](/packages/tiaxter-laravel-permission-js/feed)WikiDiscussions master Synced 1mo ago

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

[![](https://camo.githubusercontent.com/688c117697078cf033ba27f86bb4b28eae09da298292f8925e2277a81a18a089/68747470733a2f2f692e696d6775722e636f6d2f566d416b43334c2e706e67)](https://camo.githubusercontent.com/688c117697078cf033ba27f86bb4b28eae09da298292f8925e2277a81a18a089/68747470733a2f2f692e696d6775722e636f6d2f566d416b43334c2e706e67)

💡 Purpose
---------

[](#-purpose)

This package permit to check user permissions, managed by [spatie/laravel-permission](https://github.com/spatie/laravel-permission) package, directly from JS.

🚀 Installation
--------------

[](#-installation)

- First of all, you can install the package using composer

    ```
    composer require tiaxter/laravel-permission-js
    ```
- **This step can be skipper if auto-discovery is enabled**

    Add package service provider into `config/app.php` file

    ```
    'providers' => [
          ...,
          Tiaxter\LaravelPermissionJs\LaravelPermissionJsServiceProvider::class
    ];
    ```

🔰 Getting started
-----------------

[](#-getting-started)

First of all you have to include this Blade Directive inside the page where you want to use this package

```
@permissions
```

💻 Basic usage
-------------

[](#-basic-usage)

- If you're using TypeScript you will need to add this line at start of your script: ```
    declare function can(permissionName: string): bool
    ```

Checking logged in user permission

```
    const canUserDoSomething = can('permission name here'); // true or false
```

🎨 Credits
---------

[](#-credits)

- Thanks [Giorgia Marangoni](https://www.instagram.com/giorgia_marangoni_/) logo designer for her patience

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

2012d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98b92c11a6d96a679df14484edd1e5ee38c9dc7548e51bcf4cb78bf4a355b65f?d=identicon)[tiaxter](/maintainers/tiaxter)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tiaxter-laravel-permission-js/health.svg)

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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