This is a Laravel Package , where you can send 6-digits unique password in users. These Package Can easily validate users email if its listed or not !!
composer require nirab/reset-password
add these line in 'providers' array of config/app.php
nirab\resetpassword\ResetPasswordServiceProvider::class,
then , use these command to publish package config file (resetpassword.php) in config folder and email template in views folder .
php artisan vendor:publish
open to .env
file on your project & also setup database & mail connection at first
add these line on top of your controller
use nirab\resetpassword\Models\UserResetPassword;
Then,
$resetpassword = new UserResetPassword();
echo $resetpassword->SendMail($email);
Note :
$email = Email of your users.
go to config/resetpassword.php
.
then you see ,
<?php
return [
'msgSuccess' => 'A New Password Has Been Send to your Email !!',
'msgError' => 'Email is not registered !!',
'address' => 'mygmail@gmail.com',
'name' => 'Reset Your Password :: Mysite.com'
];