PHPackages                             sashsvamir/laravel-user-crud - 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. [Framework](/categories/framework)
4. /
5. sashsvamir/laravel-user-crud

ActiveLibrary[Framework](/categories/framework)

sashsvamir/laravel-user-crud
============================

User model CRUD implementation for Laravel

135PHP

Since Mar 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sashsvamir/laravel-user-crud)[ Packagist](https://packagist.org/packages/sashsvamir/laravel-user-crud)[ RSS](/packages/sashsvamir-laravel-user-crud/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel User model Crud
-----------------------

[](#laravel-user-model-crud)

This extension improve User model, add console commands and page (CRUD) to manage users.

Setup
-----

[](#setup)

Publish and run migration to update `users` table:

```
artisan vendor:publish --tag=user-crud-migrations
artisan migrate
```

Note: will be added follow columns: `roles, notify, notify-spam`

If you previously has renamed users table, you can set new name in config, but first you must publish `config/user-crud.php` config:

```
artisan vendor:publish --tag=user-crud-config
```

...and set new users table name:

```
return [
    'users_table' => 'newname',
];
```

Next, add traits `UserNotifyTrait`, `UserRolesTrait` and implementation `HasRolesInterface` to `App\Model\User`:

```
class Model implements HasRolesInterface {
    use UserNotifyTrait, UserRolesTrait;
    ...
}
```

Also you can define own roles:

```
class Model implements HasRolesInterface {
    const ROLE_MANAGER = 'manager';
    public static function getAvailableRoles(): array {
        return [
            self::ROLE_ADMIN,
            self::ROLE_MODERATOR,
            self::ROLE_MANAGER,
        ];
    }
}
```

Commands
--------

[](#commands)

Now you can use follow artisan commands to manage users:

```
artisan user:add
artisan user:change-password
artisan user:list
artisan user:notify
artisan user:notify-spam
artisan user:remove
artisan user:role-add
artisan user:role-remove
```

Gates/Roles
-----------

[](#gatesroles)

Now any user can have follow roles: `admin` and `moderator`

You can check that user have above permissions (i.e. in blade view):

```
@can('role-admin')
@can('role-moderator')
```

Also will be adding gate ability `edit-users` that has been applied to all users with `admin` roles. To check that, use follow:

```
@can('user-edit')
```

Routes
------

[](#routes)

**Warning:** below section only works with specific blade components (yet no published) and use bootstrap5 styles.

Extension adds page routes to manage users (CRUD), you can get acces by url `/admin/user`:

```
http://localhost:8080/admin/user

```

Note: By default all `/admin/user/*` web routes use `auth` and `can:edit-users` middlewares.

To add link to users CRUD in your admin template, add follow (bootstrap5 style):

```
@can('edit-users')

        Users

@endcan
```

Override blade templates
------------------------

[](#override-blade-templates)

To publish blade view files, run:

```
artisan vendor:publish --tag=user-crud-views
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![sashsvamir](https://avatars.githubusercontent.com/u/1404421?v=4)](https://github.com/sashsvamir "sashsvamir (9 commits)")

### Embed Badge

![Health badge](/badges/sashsvamir-laravel-user-crud/health.svg)

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M298](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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