kineticamobile/lumki

Laravel User Management for Laravel 13 with Jetstream
47,991 72
Install
composer require kineticamobile/lumki
Latest Version:v0.2.0
PHP:^8.3
License:MIT
Last Updated:Jul 9, 2026
Links: GitHub  ·  Packagist
Maintainer: raultm

Lumki

Laravel Users Management to Laravel 8 Jetstream (Using Spatie/LaravelPermissions & Lab404/LaravelImpersonate).

Functionalities

Gif showing impersonation

Gif showing hot to add Role to User

Gif adding new Roles and adding permissions to Role

Gif creating new permissions

Functionality Working Test
User - Index
User - Edit Roles
Role - Index
Role - Edit Permissions
Role - Create
Permission - Index
Permission - Create
Blade @lumki
Command to Setup

✓/⨯

Installation

Via Composer

$ composer require kineticamobile/lumki

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

$ php artisan lumki:setup

Explained setup

Publish spatie/laravel-permissions

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

Publish lab404/laravel-permissions

$ php artisan vendor:publish --tag=impersonate

Add permissions traits to Models/User

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

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

$ php artisan migrate

Add Impersonate Routes

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

Add Lumki menu items in User's menu

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

Add roles/permissions

$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

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'

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

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

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

Credits

License

license. Please see the license file for more information.

Related Packages

jfelder/oracledb

Oracle DB driver for Laravel 5

18,697 114
workos/workos-php-laravel

WorkOS PHP Library for Laravel

2,155,784 38
aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PH...

40,701,246 1,716
ip2location/ip2location-laravel

Lookup for visitor's IP information, such as country, region, city, coordinates,...

586,303 79