rap2hpoutre/create-user-command

使用 artisan 命令创建用户

v0.1.4 2016-12-15 15:57 UTC

This package is auto-updated.

Last update: 2024-09-18 06:09:28 UTC


README

Software License

使用 artisan 命令创建用户。

安装

通过 composer 安装

composer require rap2hpoutre/create-user-command

将 Create User 命令添加到 app/Console/Kernel.php 文件中受保护的 $commands 数组

\Rap2hpoutre\CreateUser\Command::class,

用法

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

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

然后,运行 user:create 命令。

demo

原因

有时,我必须手动创建用户(没有网络界面)。