joepriest / laravel-password-reset
A simple artisan command to reset user passwords.
v1.0.2
2023-07-31 20:27 UTC
Requires
- php: ^8.0
Requires (Dev)
- laravel/pint: ^1.10
- orchestra/testbench: ^8.5
README
A simple artisan command to reset user passwords.
Installation
Install the package via Composer:
composer require joepriest/laravel-password-reset
Usage
To reset a password, run user:reset-password
from your console, with the following options:
--user=
: The ID of the user--password=
: The new password--R|random
: Use a random password
If no user ID is provided, you will be asked to choose a user (searching the name
field by default, but this can be overridden).
If no new password is provided, and the --random
flag is not set, you will be asked for one (a random one will be suggested).
Configuration
user_model
: The path to the user model (defaults toApp\Models\User::class
)search_field
: The field to be used when searching for a user (defaults toname
)password
: The password field which the command will reset (defaults topassword
)
If you wish to override these settings, publish the configuration file:
php artisan vendor:publish
Then alter the options in config/password-reset.php
.