PHPackages                             cboxdk/lighthouse-spatie-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. [API Development](/categories/api)
4. /
5. cboxdk/lighthouse-spatie-permissions

AbandonedArchivedLibrary[API Development](/categories/api)

cboxdk/lighthouse-spatie-permissions
====================================

Adds types and mutations to lighthouse-php GraphQL for spatie/laravel-permission

v0.3.0(3y ago)18[3 PRs](https://github.com/cboxdk/lighthouse-spatie-permissions/pulls)MITPHPPHP ^8.1

Since Jul 4Pushed 2y agoCompare

[ Source](https://github.com/cboxdk/lighthouse-spatie-permissions)[ Packagist](https://packagist.org/packages/cboxdk/lighthouse-spatie-permissions)[ Docs](https://github.com/cboxdk/lighthouse-spatie-permissions)[ RSS](/packages/cboxdk-lighthouse-spatie-permissions/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (15)Versions (7)Used By (0)

This is my package lighthouse-spatie-permissions
================================================

[](#this-is-my-package-lighthouse-spatie-permissions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2d047d2e697a16587f8e50caf8a3419a6ecfffd960ba7cf027dcee50b1640626/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63626f78646b2f6c69676874686f7573652d7370617469652d7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cboxdk/lighthouse-spatie-permissions)[![GitHub Tests Action Status](https://camo.githubusercontent.com/50d20af72d40004e37ceeec9ccaed0086d1014ac63a486a62b0891008c7b87ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f63626f78646b2f6c69676874686f7573652d7370617469652d7065726d697373696f6e732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/cboxdk/lighthouse-spatie-permissions/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3ed66a1bee36e3b69867279f27c1c1ca09977cd040f4e6199c1162190166299f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f63626f78646b2f6c69676874686f7573652d7370617469652d7065726d697373696f6e732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/cboxdk/lighthouse-spatie-permissions/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/f1aca7c797879c7207ce628119915821eaa78c5106fbdb053714e1a5148b30e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63626f78646b2f6c69676874686f7573652d7370617469652d7065726d697373696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cboxdk/lighthouse-spatie-permissions)

This package is created for internal use with heavy inspiration from mlab817/lighthouse-graphql-permission.

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

[](#installation)

You can install the package via composer:

```
composer require cboxdk/lighthouse-spatie-permissions
```

You can publish the config file with:

```
php artisan vendor:publish --tag="lighthouse-spatie-permissions-config"
```

This is the contents of the published config file:

```
return [
    /*
     * Define where the schema will be stored
     */
    'schema' => null,
    /*
     * Determine the guard to use as default guard_name when creating roles and permissions
     * Defaults to api
     */
    'guard' => env('LIGHTHOUSE_PERMISSION_GUARD', 'api'),
    /*
     * Restrict mutations to specific role
     */
    'restrict' => [
        'role' => env('LIGHTHOUSE_PERMISSION_RESTRICT_MUTATIONS','admin')
    ],

    'users' => [
        'table' => env('LIGHTHOUSE_PERMISSION_USERS_TABLE', 'users'),
    ],
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="lighthouse-spatie-permissions-views"
```

Usage
-----

[](#usage)

The graphql schema is added to lighthouse. You may change it or use as is.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/cboxdk/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Sylvester Nielsen](https://github.com/sylvesternielsen)
- mlab817/lighthouse-graphql-permission

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

3

Last Release

1459d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9761a79e61f2d5b9d650510dfb3555da18daf38f027aa84012c937e397e39a7?d=identicon)[cboxdk](/maintainers/cboxdk)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![sylvesterdamgaard](https://avatars.githubusercontent.com/u/2431914?v=4)](https://github.com/sylvesterdamgaard "sylvesterdamgaard (5 commits)")

---

Tags

laravellighthouse-phpcboxdklighthouse-spatie-permissions

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/cboxdk-lighthouse-spatie-permissions/health.svg)

```
[![Health](https://phpackages.com/badges/cboxdk-lighthouse-spatie-permissions/health.svg)](https://phpackages.com/packages/cboxdk-lighthouse-spatie-permissions)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M97](/packages/dedoc-scramble)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[lettermint/lettermint-laravel

Official Lettermint driver for Laravel

1190.2k1](/packages/lettermint-lettermint-laravel)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1123.7k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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