PHPackages                             fox/laravel-user-management - 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. fox/laravel-user-management

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

fox/laravel-user-management
===========================

Fox's user management for Laravel applications.

0.2.0(4y ago)08MITPHPPHP &gt;=7.4.0

Since May 31Pushed 4y ago1 watchersCompare

[ Source](https://github.com/master-vulpus/laravel-user-management)[ Packagist](https://packagist.org/packages/fox/laravel-user-management)[ RSS](/packages/fox-laravel-user-management/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (11)Versions (4)Used By (0)

Associate users with roles and permissions
==========================================

[](#associate-users-with-roles-and-permissions)

This package is based on the [spatie/laravel-permission](https://packagist.org/packages/spatie/laravel-permission) package and provides a lot of useful extensions to use it.

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

[](#installation)

Use composer to install and use this package in your project.

Install them with

```
composer require "fox/laravel-user-management"
```

and you are ready to go!

### Set up the user provider

[](#set-up-the-user-provider)

This package provides a user provider which checks the user `active` flag. So, only active users could be login into your application. To use the user provider set them up in your `AuthServiceProvider` class.

1. Add the following line to the `boot()` method: ```
    \Fox\UserManagement\Support\UserManagement::registerUserProvider('i_am_awesome');
    ```

    > HINT: You can define the name of your user provider as you like
2. Use the registered user provider driver in your `config/auth.php`: ```
    'providers' => [
            'users' => [
                'driver' => 'i_am_awesome',
                'model' => App\User::class,
            ],
        ],
    ```
3. If you wish to use another provider instead of `users`, you have to define them in your `config/permission.php` file. > CAUTION: The provided user provider is based on the `Illuminate\Auth\EloquentUserProvider`. If you wish to use another user source, you have to overload them by yourself.

Usage
-----

[](#usage)

### Models

[](#models)

- `Fox\UserManagement\Eloquent\Models\Permission`
- `Fox\UserManagement\Eloquent\Models\Role`
- `Fox\UserManagement\Eloquent\Models\RolePermissions`

and a useful trait to enhance your user model with methods to work with roles and permissions.

- `Fox\UserManagement\Eloquent\Models\UserTrait`

### Artisan console commands

[](#artisan-console-commands)

#### permission:role-list

[](#permissionrole-list)

```
Description:
  Get a list of all available roles.

Usage:
  permission:role-list [options]

Options:
      --orderBy[=ORDERBY]                Name of the field to order the list [default: "id"]
      --orderDirection[=ORDERDIRECTION]  Direction to order the list (ASC or DESC) [default: "ASC"]
  -h, --help                             Display this help message
  -q, --quiet                            Do not output any message
  -V, --version                          Display this application version
      --ansi                             Force ANSI output
      --no-ansi                          Disable ANSI output
  -n, --no-interaction                   Do not ask any interactive question
      --env[=ENV]                        The environment the command should run under
  -v|vv|vvv, --verbose                   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

You also get all provided commands of the [spatie/laravel-permission](https://packagist.org/packages/spatie/laravel-permission) package:

- permission:cache-reset
- permission:create-permission
- permission:create-role
- permission:show

#### user:create

[](#usercreate)

```
Description:
  Create a new application user.

Usage:
  user:create

Arguments:
  email                 Email of the new user
  name                  The name of the new user

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

#### user:list

[](#userlist)

```
Description:
  Get a list of all registered users.

Usage:
  user:list [options]

Options:
      --active                           Show only active users
      --inactive                         Show only inactive/disabled users
      --orderBy[=ORDERBY]                Name of the field to order the list [default: "id"]
      --orderDirection[=ORDERDIRECTION]  Direction to order the list (ASC or DESC) [default: "ASC"]
      --showTimestamps                   Add created and / updated datetime information to the list
  -h, --help                             Display this help message
  -q, --quiet                            Do not output any message
  -V, --version                          Display this application version
      --ansi                             Force ANSI output
      --no-ansi                          Disable ANSI output
  -n, --no-interaction                   Do not ask any interactive question
      --env[=ENV]                        The environment the command should run under
  -v|vv|vvv, --verbose                   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

#### user:edit

[](#useredit)

```
Description:
  Update common user information like email or name.

Usage:
  user:edit

Arguments:
  id                    Id of the designated user

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

#### user:roles

[](#userroles)

```
Description:
  List, assign or remove roles from a user.

Usage:
  user:roles [options] [--]

Arguments:
  id                     Id of the designated user

Options:
      --assign[=ASSIGN]  A list of roles to assign to the designated user, separated by ,
      --remove[=REMOVE]  A list of roles to remove from the designated user, separated by ,
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
      --env[=ENV]        The environment the command should run under
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

#### user:set-password

[](#userset-password)

```
Description:
  Set a user password.

Usage:
  user:set-password

Arguments:
  id                    Id of the designated user

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

#### user:activate

[](#useractivate)

```
Description:
  Activate one or more users.

Usage:
  user:activate ...

Arguments:
  id                    Id(s) of the designated user(s)

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

#### user:deactivate

[](#userdeactivate)

```
Description:
  Deactivate one or more users.

Usage:
  user:deactivate ...

Arguments:
  id                    Id(s) of the designated user(s)

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
      --env[=ENV]       The environment the command should run under
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

Development - Getting Started
-----------------------------

[](#development---getting-started)

See the [CONTRIBUTING](CONTRIBUTING.md) file.

Changelog
---------

[](#changelog)

See the [CHANGELOG](CHANGELOG.md) file.

License
-------

[](#license)

See the [LICENSE](LICENSE.md) file.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

3

Last Release

1786d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2caf20183e4c2c5175a144f47649e6867e5fce2bb4094a49feb852a8bf2af40f?d=identicon)[Cyberfox](/maintainers/Cyberfox)

---

Top Contributors

[![master-vulpus](https://avatars.githubusercontent.com/u/2370344?v=4)](https://github.com/master-vulpus "master-vulpus (7 commits)")

---

Tags

spatielaraveluserpermissionsUser managementapplicationmanagement

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/fox-laravel-user-management/health.svg)

```
[![Health](https://phpackages.com/badges/fox-laravel-user-management/health.svg)](https://phpackages.com/packages/fox-laravel-user-management)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)

PHPackages © 2026

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