PHPackages                             brhn/password-changed-notification - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. brhn/password-changed-notification

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

brhn/password-changed-notification
==================================

A simple package to send mail notification to the user when the password is changed.

1.0.1(1y ago)05[4 PRs](https://github.com/brhan-kbt/Password-Changed-Notification/pulls)MITPHPPHP ^8.0CI passing

Since Sep 19Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/brhan-kbt/Password-Changed-Notification)[ Packagist](https://packagist.org/packages/brhn/password-changed-notification)[ Docs](https://github.com/brhn/password-changed-notification)[ GitHub Sponsors](https://github.com/Brhn)[ RSS](/packages/brhn-password-changed-notification/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (13)Versions (7)Used By (0)

Password Changed Notification
=============================

[](#password-changed-notification)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3264835c033dcb5d4fae7965b99f372d0420c7fcac1b41fe185d43e89f258b55/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617364682f70617373776f72642d6368616e6765642d6e6f74696669636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/brhn/password-changed-notification)[![GitHub Tests Action Status](https://camo.githubusercontent.com/a4e816f90b905a92e5a9e0010da47f32fb4b3197d37df2aad435f09ae7f49810/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f617364682f70617373776f72642d6368616e6765642d6e6f74696669636174696f6e2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/brhn/password-changed-notification/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/333377cf18c1ee8548db27c26d31b941ddb0a1d9a77d34a3f0497bcd056a7b9f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6272686e2f70617373776f72642d6368616e6765642d6e6f74696669636174696f6e2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/asdh/password-changed-notification/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/07c7b7f8e4fa5b7195909215ed40bee18de0a906018d9a42675eb551b9a6021f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6272686e2f70617373776f72642d6368616e6765642d6e6f74696669636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/brhn/password-changed-notification)

A simple package to send mail notification to the user when their password is changed.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require brhn/password-changed-notification
```

Usage
-----

[](#usage)

After installing the package, you can go to your `User` model or any other model that has password and email fields and use `PasswordChangedTrait` trait and implement `PasswordChangedNotificationContract` interface

```
use Brhn\PasswordChangedNotification\Contracts\PasswordChangedNotificationContract;
use Brhn\PasswordChangedNotification\Traits\PasswordChangedTrait;

class User extends Authenticatable implements PasswordChangedNotificationContract
{
    use PasswordChangedTrait;
}
```

Now whenever you change the password of the user, a mail will be automatically sent to that user. Isn't that easy.

By default the package will assume the columns name to be `email` and `password`. But if you have different column name for those fields then you can modify those as well.

Let's say you have the `email` column as `user_email` in your `User` model or any other model, then you can add `emailColumnName` method on the `User` model and return `user_email` from here like so:

```
public function emailColumnName(): string
{
    return 'user_email';
}
```

You can also modify the `password` column by adding this method.

```
public function passwordColumnName(): string
{
    return 'user_password';
}
```

You can also modify the `name` column by adding this method.

```
public function nameColumnName(): string
{
    return 'user_name';
}
```

You can also modify the `name` column by adding this method. This will be used in the mail like Hi `Adam`.

```
public function nameColumnName(): string
{
    return 'full_name';
}
```

Further, if you want to modify the mail that is being sent to the user, you can publish the mail view using

```
php artisan vendor:publish --tag="password-changed-notification-views"
```

The views view will now be published in `resources/views/vendor/password-changed-notification/emails/password-changed-notification.blade.php`. You can modify this file as per your need and when mail is sent to the user, it will be used.

You can also create your own mailable (the one that you create using `php artisan make:mail` command) and use that instead. For that you need to return the mailable that you have created by adding `passwordChangedNotificationMail` method on the `User` model and returning the mailable.

```
public function passwordChangedNotification(): Mailable
{
    return new YourOwnPasswordChangedNotificationMail($this);
}
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Brhn](https://github.com/brhan-kbt)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance59

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

607d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/35be59d8874ed9642143a7c34c145da8349794393d8f133cd5c7954b9d24d6e0?d=identicon)[brhan-kbt](/maintainers/brhan-kbt)

---

Top Contributors

[![brhan-kbt](https://avatars.githubusercontent.com/u/58462920?v=4)](https://github.com/brhan-kbt "brhan-kbt (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelpassword-changed-notificationBrhn

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/brhn-password-changed-notification/health.svg)

```
[![Health](https://phpackages.com/badges/brhn-password-changed-notification/health.svg)](https://phpackages.com/packages/brhn-password-changed-notification)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[xammie/mailbook

Laravel Mail Explorer

482458.3k1](/packages/xammie-mailbook)[spatie/laravel-notification-log

Log notifications sent by your Laravel app

207902.8k](/packages/spatie-laravel-notification-log)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)[spatie/laravel-discord-alerts

Send a message to Discord

151408.0k](/packages/spatie-laravel-discord-alerts)[backstage/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24157.5k5](/packages/backstage-laravel-mails)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
