bitboss-hub/laravel-terminal-users

This package provides some functionalities to manage your users from Laravel CLI

v0.1.3 2022-02-16 09:45 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status

This package provides some functionalities to manage your users from laravel artisan terminal

Installation

You can install the package via composer:

composer require bitboss-hub/laravel-terminal-users

You can publish the config file with:

php artisan vendor:publish --tag="manage-terminal-users-config"

This is the contents of the published config file:

   return [

    /**
     * With field to check when the user can prompt. Ex: email, id
     */
    'field_to_check' => 'email',

    /**
     * Which field to update. Ex: password
     */
    'field_to_update' => 'password',

    /**
     * Should the password be encrypted? Default value: hash. Possible values: plain
     */
    'hash' => 'hash',

    /**
     * Which is the authenticable model? If null, we get it from the auth configuration
     */
    'model' => null,

    /**
     * Express optional password validation using Laravel Validation syntax
     */
    'validation' => null
];

Usage

You can call the Command using:

> php artisan bitboss:manage-users

Then, follow the instructions of the script.

 What's the user's email?:
 > ...

Prompt the email, or the other field defined in field_to_check configuration.

 Ok, now choose a password:
> ...

Prompt a password for the user found.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.