PHPackages                             kineticamobile/lumki - 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. kineticamobile/lumki

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

kineticamobile/lumki
====================

Laravel User Management for Laravel 9 with Jetstream

v0.1.12(3y ago)7244.1k↑1166.7%25[6 issues](https://github.com/kineticamobile/lumki/issues)MITPHP

Since Oct 11Pushed 1y ago3 watchersCompare

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

READMEChangelogDependencies (7)Versions (14)Used By (0)

Lumki
=====

[](#lumki)

Laravel Users Management to Laravel 8 Jetstream (Using [Spatie/LaravelPermissions](https://github.com/spatie/laravel-permission) &amp; [Lab404/LaravelImpersonate](https://github.com/404labfr/laravel-impersonate)).

Functionalities
---------------

[](#functionalities)

Impersonation / Leave:[![Gif showing impersonation](assets/user_impersonation_leave.gif)](assets/user_impersonation_leave.gif)

Add Role To User: [![Gif showing hot to add Role to User](assets/users_add_role.gif)](assets/users_add_role.gif)

Roles - Create and associate Permissions: [![Gif adding new Roles and adding permissions to Role](assets/roles_index_create_permissions.gif)](assets/roles_index_create_permissions.gif)

Permissions - Index and create new: [![Gif creating new permissions](assets/permissions_index_create.gif)](assets/permissions_index_create.gif)

FunctionalityWorkingTestUser - Index✓⨯User - Edit Roles✓⨯Role - Index✓⨯Role - Edit Permissions✓⨯Role - Create✓⨯Permission - Index✓⨯Permission - Create✓⨯Blade @lumki✓⨯Command to Setup✓⨯✓/⨯

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

[](#installation)

Via Composer

```
$ composer require kineticamobile/lumki
```

Setup over Laravel 8 Jetstream at least one User registered to associate permissions
------------------------------------------------------------------------------------

[](#setup-over-laravel-8-jetstream-at-least-one-user-registered-to-associate-permissions)

```
$ php artisan lumki:setup
```

Explained setup
---------------

[](#explained-setup)

### Publish spatie/laravel-permissions

[](#publish-spatielaravel-permissions)

```
$ php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
```

### Publish lab404/laravel-permissions

[](#publish-lab404laravel-permissions)

```
$ php artisan vendor:publish --tag=impersonate
```

### Add permissions traits to Models/User

[](#add-permissions-traits-to-modelsuser)

```
Lumki::insertLineAfter(
    app_path("Models/User.php"),
    "use Laravel\Jetstream\HasProfilePhoto;",
    "use Spatie\Permission\Traits\HasRoles;"
);
```

```
Lumki::insertLineAfter(
    app_path("Models/User.php"),
    "use HasProfilePhoto;",
    "use HasRoles;"
);
```

### Add impersonate traits to Models/User

[](#add-impersonate-traits-to-modelsuser)

```
Lumki::insertLineAfter(
    app_path("Models/User.php"),
    "use Spatie\Permission\Traits\HasRoles;",
    "use Lab404\Impersonate\Models\Impersonate;"
);
```

```
Lumki::insertLineAfter(
    app_path("Models/User.php"),
    "use HasRoles;",
    "use Impersonate;"
);
```

### Run migrations

[](#run-migrations)

```
$ php artisan migrate
```

### Add Impersonate Routes

[](#add-impersonate-routes)

```
Lumki::insertLineBefore(
        base_path("routes/web.php"),
        "Route::get('/', function () {",
        "Route::impersonate();\n"
);
```

### Add Lumki menu items in User's menu

[](#add-lumki-menu-items-in-users-menu)

```
Lumki::insertLineBefore(
        resource_path('views/navigation-dropdown.blade.php'),
        "@if (Laravel\Jetstream\Jetstream::hasApiFeatures())",
        "\n@lumki\n"
);
```

### Add roles/permissions

[](#add-rolespermissions)

```
$r1 = Role::firstOrCreate(["name" => "Superadmin"]);
$r2 = Role::firstOrCreate(["name" => "Admin"]);
$r3 = Role::firstOrCreate(["name" => "User"]);

$p1 = Permission::firstOrCreate(['name' => 'manage users']);

$r1->givePermissionTo('manage users');

$user = User::first();
$user->assignRole($r1);
$user->assignRole($r2);
$user->assignRole($r3);
```

Usage
-----

[](#usage)

### Customizable prefix for your routes

[](#customizable-prefix-for-your-routes)

To change the prefix `lumki` in your routes you must publish the configuration

```
$ php artisan vendor:publish --tag=lumki.config
```

Now, you can edit the file `config/lumki.php` and change the prefix from 'lumki' to whatever you want, empty string allowed, if this field is null 'lumki' is set as default value.

### Error 'GuardDoesNotMatch'

[](#error-guarddoesnotmatch)

If you are struggling with the error of GuardDoesNotMatch could be that you have modified the provider in your `config/auth.php` file

In order to solve this problem you can specify the guard name of the model.

Eg: If you are using User Model but with an ldap connection using LdapRecord you can resolve this problem adding the code above in your User Model

```
class User extends Authenticatable
{
    // ...

    public function guardName(){
        return "web";
    }
}
```

Change log
----------

[](#change-log)

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

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [author name](https://github.com/kineticamobile)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.6% 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 ~71 days

Recently: every ~189 days

Total

13

Last Release

1227d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8624950?v=4)[Daniel Macías Ramos](/maintainers/dmaciasr)[@dmaciasr](https://github.com/dmaciasr)

![](https://avatars.githubusercontent.com/u/659494?v=4)[Raul Tierno](/maintainers/raultm)[@raultm](https://github.com/raultm)

![](https://www.gravatar.com/avatar/268b4ade9baa01da3db593e97acca7040f270ffa1cc8a9710cd5363098edcc50?d=identicon)[kinetica](/maintainers/kinetica)

![](https://www.gravatar.com/avatar/5ce3a0c442af6766ca31d741abceb04c54e54cfde22a88edf03f8e0ce1c3b16a?d=identicon)[acontor](/maintainers/acontor)

---

Top Contributors

[![raultm](https://avatars.githubusercontent.com/u/659494?v=4)](https://github.com/raultm "raultm (24 commits)")[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (4 commits)")[![shbov](https://avatars.githubusercontent.com/u/32542672?v=4)](https://github.com/shbov "shbov (4 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")

---

Tags

laravellaravel 9users managementLumki

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kineticamobile-lumki/health.svg)

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k3.5M118](/packages/bezhansalleh-filament-shield)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5742.2M17](/packages/directorytree-ldaprecord-laravel)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

42010.0k](/packages/venturedrake-laravel-crm)

PHPackages © 2026

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