Download the PHP package zenepay/password-expiry without Composer
On this page you can find all versions of the php package zenepay/password-expiry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zenepay/password-expiry
More information about zenepay/password-expiry
Files in zenepay/password-expiry
Package password-expiry
Short Description It handles password expiry of users.
License MIT
Homepage https://github.com/zenepay/password-expirable
Informations about the package password-expiry
Password Expiry for Laravel
Password expiry
- It allows you to set user password to expire in x days after creating/resetting.
- Using imanghafoori/laravel-password-history, user cannot use the last x previous paswords.
- Can use as middleware and validation
- It does support Laravel 9.x - 11.x
Install
Via Composer
You need to migrate you database.
You can publish the config file with:
When published, the config/password_history.php
config file contains:
You can change it according to your needs.
Usage
-
Include Following trait in User Model
-
You can check if user password is expired?
- You can protect your routes from user with expired password
by :
For Laravel < 11
add following middleware to app/Http/Kernel.php
- To prevent user with password expire to access page. This will redirect to reset password page
For Laravel 11
Add this to bootstrap/app.php
For Laravel + Filament 3
For Laravel Filament 3, you can put to panel middleware
Validate to prevent using previous passwords
In any validate for password rule, add NoPreviousPassword::ofUser($user) in
In Filament with Breezy plugin and Profile page you can add rule as below
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
- [Iman]https://github.com/imanghafoori1 for his great password history package
- [Fahad Ali]https://github.com/fahad-larasoft for is an inspireation of password-expirable package
- [All Contributors][link-contributors]
License
The MIT License (MIT). Please see License File for more information.
All versions of password-expiry with dependencies
php Version ^8.1
imanghafoori/laravel-password-history Version ^1.0.2