PHPackages                             larasoft/password-expirable - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. larasoft/password-expirable

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

larasoft/password-expirable
===========================

It handles password expiry of users.

2.0(2y ago)021[2 issues](https://github.com/fahad-larasoft/password-expirable/issues)MITPHPPHP ^8.0

Since Feb 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fahad-larasoft/password-expirable)[ Packagist](https://packagist.org/packages/larasoft/password-expirable)[ Docs](https://github.com/fahad-larasoft/password-expirable)[ RSS](/packages/larasoft-password-expirable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (0)

Password Expiry for Laravel 9.x | 10.x
======================================

[](#password-expiry-for-laravel-9x--10x)

Password Strength has following characteristics:

- It will allow your to set Expiry time of user password and send them reset emails.
- Version 1.0 for Laravel 5.1.x - 5.5.x
- Version 2.0 does support Laravel 9.x &amp; 10.x

Install
-------

[](#install)

Via Composer (v1.0)

```
$ composer require larasoft/password-expirable:1.0
```

Via Composer (v2.0)

```
$ composer require larasoft/password-expirable
```

You must include the service provider in config/app.php:

```
'providers' => [
    ...
    Larasoft\PasswordExpiry\PasswordExpiryServiceProvider::class,
],
```

You need to migrate you database.

```
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Larasoft\PasswordExpiry\PasswordExpiryServiceProvider" --tag="config"
```

When published, the `config/password-expiry.php` config file contains:

```
return [

      // # of Days: After which user password gets expired and user should receive password reset email/notification
      'expiry_days' => 2,

      // Expiry message to send in password email/notification
      'expiry_message' => 'It has been over :number days since you reset your password. Please update it now.',

      'strong_password_rules' => 'case_diff|numbers|letters|symbols'
];
```

You can change it according to your needs.

Usage
-----

[](#usage)

- Include Following trait in User Model

```
use PasswordExpirable;
```

- You can get the datetime Carbon instance of "when the current password was set on user object"

```
$user->getCurrentPasswordSetTime();
```

- You can check if user password is expired?

```
$user->isPasswordExpired();
```

- You can protect your routes from user with expired password by adding following middleware into your app/Http/Kernel.php and applying it onto your required routes. You can change the name 'check-password-expired' how you like.

```
protected $routeMiddleware = [
    ...
    'check-password-expired' => CheckPasswordExpired::class
]
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email :author\_email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Fahad Ali](https://www.linkedin.com/in/fahad3)
- [All Contributors](https://www.linkedin.com/in/fahad3/)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~667 days

Total

4

Last Release

991d ago

Major Versions

1.0.x-dev → 2.02023-08-24

PHP version history (2 changes)1.0PHP ~5.6|~7.0

2.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8550617?v=4)[Larasoft.io](/maintainers/larasoft-io)[@larasoft-io](https://github.com/larasoft-io)

---

Top Contributors

[![fahad-larasoft](https://avatars.githubusercontent.com/u/7126820?v=4)](https://github.com/fahad-larasoft "fahad-larasoft (11 commits)")[![larasoft-io](https://avatars.githubusercontent.com/u/8550617?v=4)](https://github.com/larasoft-io "larasoft-io (2 commits)")

---

Tags

laravel-password-expiryLarasoftPasswordExpirable

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/larasoft-password-expirable/health.svg)

```
[![Health](https://phpackages.com/badges/larasoft-password-expirable/health.svg)](https://phpackages.com/packages/larasoft-password-expirable)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[stechstudio/laravel-jwt

Helper package that makes it easy to generate, consume, and protect routes with JWT tokens in Laravel

126117.6k](/packages/stechstudio-laravel-jwt)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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