New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

spresnac/laravel-create-user-cli

Create a user-entry from cli with artisan
61,713 23
Install
composer require spresnac/laravel-create-user-cli
Latest Version:1.0.6
PHP:^7.4|^8.0|^8.1
Older releases:5 · 6
License:MIT
Last Updated:Aug 24, 2022
Links: GitHub  ·  Packagist
Maintainer: spresnac

Laravel: Create a user from CLI with artisan

Software License PHP from Packagist Laravel Version

GitHub Workflow Status
Codecov
StyleCI


About this package 💡

This package is an easy way to create a user for a ci/cd workflow. Just setup your project as usual and create a new user by firing a cli-command.


Installation 💻

First things first, so require the package:

composer require spresnac/laravel-create-user-cli

Now, register the new command within your app\Console\Kernel.php

    protected $commands = [
        \spresnac\createcliuser\CreateCliUserCommand::class,
    ];

Usage 💪

This package is very simple to use, open up your console and type

php artisan user:create

When using it within some kind of continous deployment, use the parameter and options to get fully automated like

php artisan user:create "user_name" "user_email" "user_password" --force

One can get help with

php artisan help user:create

CI environments

This is an overview of all result codes you can handle in ci environements:

Code Description
0 all good 😃
1 The user with this data is already existing and was not overwritten. Use the --force option to overwrite the user.
2 There is a user exisiting with this data and there was a problem updating this database record.
5 You should not get this code. If you do, you may have not provided all data correct.

Tests 🤓

Start the tests like standard with

composer test-ci

or with

vendor/bin/phpunit

Finally 🤩

... have fun ;)

Related Packages

croustibat/composer-check

Interactive CLI tool to check and update outdated Composer dependencies

1,228 5
leafs/aloe

Overpowered command line tool for your leaf apps.

20,063 5
nunomaduro/termwind

It's like Tailwind CSS, but for the console.

326,354,068 2,502
mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

109,655 103

Version History

Version Released PHP Laravel License
1.0.6 ^7.4|^8.0|^8.1 MIT
1.0.5 ^7.3|^7.4|^8.0 MIT
1.0.4 ^7.3|^7.4|^8.0 MIT
1.0.3 ^7.2 MIT
1.0.2 7.* 5.*|^6.0 MIT