amdadulhaq/user-creator-laravel
最新稳定版本:v2.0.1
Composer 安装命令:
composer require amdadulhaq/user-creator-laravel
包简介
Command line user creator for Laravel
README 文档
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.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-19