Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spresnac/laravel-create-user-cli
Create a user-entry from cli with artisan
https://github.com/spresnac/laravel-create-user-cli
artisan artisan-command cli hacktoberfest laravel laravel-framework laravel-package
Last synced: about 1 month ago
JSON representation
Create a user-entry from cli with artisan
- Host: GitHub
- URL: https://github.com/spresnac/laravel-create-user-cli
- Owner: spresnac
- License: mit
- Created: 2019-03-08T07:48:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-24T08:58:56.000Z (about 2 years ago)
- Last Synced: 2024-09-28T20:20:51.086Z (about 2 months ago)
- Topics: artisan, artisan-command, cli, hacktoberfest, laravel, laravel-framework, laravel-package
- Language: PHP
- Homepage: https://spresnac.github.io/laravel-create-user-cli
- Size: 55.7 KB
- Stars: 23
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Laravel: Create a user from CLI with artisan
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge&logo=github)](LICENSE)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/spresnac/laravel-create-user-cli.svg?style=for-the-badge&logo=php)](https://packagist.org/packages/spresnac/laravel-create-user-cli)
[![Laravel Version](https://img.shields.io/badge/Laravel-%5E7%20|%20%5E8-important?style=for-the-badge&logo=laravel)](https://laravel.com)[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/spresnac/laravel-create-user-cli/tests?label=GH%20Tests&logo=github&style=for-the-badge)](https://github.com/spresnac/laravel-create-user-cli/actions)
![Codecov](https://img.shields.io/codecov/c/gh/spresnac/laravel-create-user-cli?logo=codecov&style=for-the-badge&token=6BEX55062B)
[![StyleCI](https://github.styleci.io/repos/174492279/shield)](https://github.styleci.io/repos/174492279)---
# 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 ;)