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 13 with Jetstream

v0.2.0(1mo ago)7246.8k↑1890.5%25[6 issues](https://github.com/kineticamobile/lumki/issues)MITPHPPHP ^8.3

Since Oct 11Pushed 1mo 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 2d ago

READMEChangelogDependencies (13)Versions (15)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

60

—

FairBetter than 98% of packages

Maintenance92

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 68.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 ~161 days

Recently: every ~495 days

Total

14

Last Release

33d 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)")[![DaarkinBlade](https://avatars.githubusercontent.com/u/116033608?v=4)](https://github.com/DaarkinBlade "DaarkinBlade (1 commits)")

---

Tags

laravelusers managementlaravel-13Lumki

###  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

[althinect/filament-spatie-roles-permissions

3491.2M12](/packages/althinect-filament-spatie-roles-permissions)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

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