amdadulhaq / user-creator-laravel
Command line user creator for Laravel
Fund package maintenance!
amdad121
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/amdadulhaq/user-creator-laravel
Requires
- php: ^8.2|^8.3|^8.4|^8.5
- illuminate/contracts: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
- driftingly/rector-laravel: ^1.0|^2.0
- larastan/larastan: ^2.0|^3.0
- laravel/pint: ^1.26
- orchestra/testbench: ^8.0|^9.0|^10.0
- pestphp/pest: ^2.0|^3.0|^4.0
- pestphp/pest-plugin-laravel: ^2.0|^3.0|^4.0
README
A simple command line user creator for Laravel with validation and configuration support.
Installation
You can install the package via composer:
composer require amdadulhaq/user-creator-laravel --dev
You can publish the config file with:
php artisan vendor:publish --tag=user-creator-config
Configuration
Optionally, you can publish the configuration file to customize the user model:
// config/user-creator.php return [ 'user_model' => env('USER_CREATOR_MODEL', \App\Models\User::class), ];
Usage
Interactive Mode
Run the command without arguments to be prompted for user details:
php artisan user:create
Direct Arguments
Provide all arguments directly:
php artisan user:create "John Doe" john@example.com password123
With Optional Password
Password can be omitted and will be prompted securely:
php artisan user:create "John Doe" john@example.com
Validation
The command validates input before creating a user:
- Name: Required, string, max 255 characters
- Email: Required, valid email format, max 255 characters
- Password: Required, minimum 8 characters
Testing
composer test
For code style:
composer lint
For static analysis:
composer analyse
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.