sergeybruhin / laravel-user-commands
Artisan commands for managing Laravel users
Package info
github.com/sergeybruhin/laravel-user-commands
pkg:composer/sergeybruhin/laravel-user-commands
Requires
- php: ^8.2
- illuminate/console: ^12.0
- illuminate/support: ^12.0
Requires (Dev)
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-06-10 23:25:57 UTC
README
Artisan commands to create, delete, and change passwords for Laravel users.
Installation
You can install the package via composer:
composer require sergeybruhin/laravel-user-commands
Optionally publish the config:
php artisan vendor:publish --provider="SergeyBruhin\LaravelUserCommands\Providers\LaravelUserCommandsServiceProvider" --tag="config"
Commands
users:create
Creates a new user. Prompts interactively if options are omitted. Sets email_verified_at automatically.
# Interactive php artisan users:create # Non-interactive php artisan users:create --name="John Doe" --email="john@example.com" --password="secret123"
users:change-password
Changes the password of an existing user. When run without --password, prompts for the new password and a confirmation.
# Interactive php artisan users:change-password # Non-interactive php artisan users:change-password --email="john@example.com" --password="newpassword"
users:delete
Deletes an existing user. Shows user details and asks for confirmation unless --force is passed.
# Interactive (with confirmation prompt) php artisan users:delete # Target a specific user php artisan users:delete --email="john@example.com" # Skip confirmation php artisan users:delete --email="john@example.com" --force
Configuration
// config/laravel-user-commands.php return [ 'user_model' => \App\Models\User::class, 'min_password_length' => 6, ];
| Key | Default | Description |
|---|---|---|
user_model |
App\Models\User |
Eloquent model used for all user operations. |
min_password_length |
6 |
Minimum character length enforced on create and change-password. |
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email sundaycreative@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.