Wallogit.com
2017 © Pedro Peláez
A a console command to reset user passwords
A simple artisan command to reset user passwords., (*1)
Install the package via Composer:, (*3)
$ composer require joepriest/passwordreset
If you're using a version of Laravel prior to 5.5, add the service provider to config/app.php., (*4)
'providers' => [
// ...
JoePriest\PasswordReset\PasswordResetServiceProvider::class,
];
The command uses default settings for the user model, and the name and password fields. If you wish to override these settings, publish the configuration file:, (*5)
php artisan vendor:publish
Then alter the options in config/passwordreset.php., (*6)
To reset a password, run user:resetpassword from your console., (*7)
php artisan user:resetpassword {user_id?} {new_password?} {--random}
If no user id is provided, you will be asked to choose a user (this defaults to the name field but can be overriden)., (*8)
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)., (*9)