andp97/create-user-command

Create a user with artisan command

v0.1.6 2021-03-17 22:47 UTC

This package is auto-updated.

Last update: 2024-04-21 20:23:01 UTC


README

Software License

Create a user with artisan command.

NEW: Added support for php ^7.3 or ^8.0 and Laravel 8

Install

Install via composer

composer require andp97/create-user-command

Add the Create User command to app/Console/Kernel.php in protected $commands array

\Andp97\CreateUser\Command::class,

Usage

Define fillable attributes in your User class.

protected $fillable = ['name', 'email', 'role'];

Then, run user:create command.

demo

Why

Sometimes, I have to manually create user (with no web interface).