This Laravel package automatically sends a notification to users when their password is changed. It does not store or email the new password.
You can easily install this package via Composer:
composer require shibly/password-notifyPublish the configuration file to customize package behavior:
php artisan vendor:publish --tag=configThis will publish passwordnotify.php into your application's config directory.
Modify config/passwordnotify.php to define the password field:
return [
'password_field' => 'password',
];You can customize this field if your application uses a different naming convention.
When changing a user's password, the notification will automatically be sent if the configured password field changes:
use Illuminate\Support\Facades\Hash;
$user = auth()->user();
$user->update([
'password' => Hash::make('MySecurePassword123'),
]);You don't need to do anything else. The package listens for password changes and sends a notification automatically.
The user will receive a notification similar to:
Hello, John Doe!
Your password has been successfully changed.
If you did not change your password, please contact support immediately.By default, notifications will be queued. Ensure your Laravel queue worker is running:
php artisan queue:work- PHP
^8.1 - Laravel
^11.0|^12.0
Feel free to submit issues or pull requests to improve this package!
This package is open-source and licensed under the [MIT license].