Skip to content

amdad121/user-creator-laravel

Repository files navigation

Command line user creator for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.

About

Command line user creator for Laravel

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Contributors

Languages