PHPackages                             mubeen/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. mubeen/laravel-user-crud

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

mubeen/laravel-user-crud
========================

Laravel package for user CRUD operations and authentication

v2.0.0(1y ago)09MITPHPPHP ^8.2

Since Apr 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mubisaeed/laravel-crud-package)[ Packagist](https://packagist.org/packages/mubeen/laravel-user-crud)[ RSS](/packages/mubeen-laravel-user-crud/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Laravel User CRUD
=================

[](#laravel-user-crud)

A Laravel 12 package that provides complete user management with authentication and CRUD operations out of the box. Supports both web and API interfaces with multiple authentication providers.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 12.x

Features
--------

[](#features)

- Complete user management (CRUD)
- Authentication (login, register, logout)
- Works with both web and API interfaces
- API support for multiple authentication providers:
    - Laravel Sanctum
    - Laravel Passport
    - JWT Auth

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

[](#installation)

You can install this package via composer:

```
composer require mubeen/laravel-user-crud
```

After installing the package, run the installation command which will prompt you to choose your preferred interface (web or API) and authentication provider:

```
php artisan laravel-user-crud:install
```

The installer will create the necessary configuration, publish resources, and guide you through setting up any additional dependencies.

Configuration
-------------

[](#configuration)

The installation command generates a configuration file, but you can also publish it manually:

```
php artisan vendor:publish --provider="Mubeen\LaravelUserCrud\LaravelUserCrudServiceProvider" --tag="laravel-user-crud"
```

This will publish the following files:

- Configuration file: `config/laravel-user-crud.php`
- Migrations: `database/migrations/`
- Views (if web interface): `resources/views/vendor/laravel-user-crud/`

Usage
-----

[](#usage)

### Web Interface

[](#web-interface)

If you chose the web interface during installation, you'll have access to these routes:

#### Authentication

[](#authentication)

- Login: `/login`
- Register: `/register`
- Logout: POST to `/logout`

#### User Management

[](#user-management)

User management routes are prefixed with `/admin` by default (configurable):

- List users: `/admin/users`
- Create user: `/admin/users/create`
- Show user: `/admin/users/{user}`
- Edit user: `/admin/users/{user}/edit`
- Delete user: DELETE to `/admin/users/{user}`

### API Interface

[](#api-interface)

If you chose the API interface during installation, you'll have access to these endpoints:

#### Authentication

[](#authentication-1)

- Login: POST to `/auth/login`
- Register: POST to `/auth/register`
- Logout: POST to `/auth/logout` (requires authentication)
- Get profile: GET to `/auth/profile` (requires authentication)
- Update profile: PUT to `/auth/profile` (requires authentication)

#### User Management

[](#user-management-1)

User management endpoints are prefixed with `/api` by default (configurable):

- List users: GET to `/api/users`
- Create user: POST to `/api/users`
- Show user: GET to `/api/users/{user}`
- Update user: PUT/PATCH to `/api/users/{user}`
- Delete user: DELETE to `/api/users/{user}`

### Authentication Providers

[](#authentication-providers)

When using the API interface, you can choose from three authentication providers:

#### Laravel Sanctum

[](#laravel-sanctum)

Ideal for SPAs, mobile applications, and simple API tokens. The package will automatically add necessary authentication setup.

#### Laravel Passport

[](#laravel-passport)

More feature-rich OAuth2 server. Suitable for creating OAuth2 APIs with personal access tokens, password grants, and more.

#### JWT Auth

[](#jwt-auth)

JSON Web Token authentication for stateless API authentication.

Customization
-------------

[](#customization)

You can customize the behavior in the configuration file:

```
// config/laravel-user-crud.php

return [
    // Interface type: 'web' or 'api'
    'interface_type' => 'web',

    // Auth provider for API: 'sanctum', 'passport', or 'jwt'
    'auth_provider' => null,

    // Routes prefix for all the package routes
    'route_prefix' => 'admin',

    // Middleware to apply to the routes
    'middleware' => ['web', 'auth'],

    // Admin routes middleware
    'admin_middleware' => ['web', 'auth'],

    // View layout to extend (for web interface)
    'layout' => 'layouts.app',

    // Additional user fields
    'additional_user_fields' => [],

    // API response settings
    'api_pagination_limit' => 15,

    // Token settings (for Sanctum/Passport)
    'token_name' => 'User Management',
    'token_expiration_days' => 30,
];
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Mubeen](https://github.com/mubeen)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance47

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

Total

2

Last Release

389d ago

Major Versions

v1.0.0 → v2.0.02025-04-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bdf847f0eab637ef46ada15664d933e9bcbccbf8275c18d3bd5782362451413?d=identicon)[mubisaeed](/maintainers/mubisaeed)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

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

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)

PHPackages © 2026

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