andp97/create-user-command

使用 artisan 命令创建用户

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

This package is auto-updated.

Last update: 2024-09-21 21:14:42 UTC


README

Software License

使用 artisan 命令创建用户。

新增: 增加了支持 php ^7.3 或 ^8.0 以及 Laravel 8

安装

通过 composer 安装

composer require andp97/create-user-command

将 Create User 命令添加到 app/Console/Kernel.php 中的 protected $commands 数组

\Andp97\CreateUser\Command::class,

用法

在您的 User 类中定义可填充的属性。

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

然后,运行 user:create 命令。

demo

原因

有时候,我需要手动创建用户(没有网络界面)。