PHPackages                             infinitypaul/laravel-password-history-validation - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. infinitypaul/laravel-password-history-validation

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

infinitypaul/laravel-password-history-validation
================================================

Prevent users from reusing recently used passwords

2.0.2(1y ago)84261.6k↓58.6%27[1 PRs](https://github.com/infinitypaul/laravel-password-history-validation/pulls)MITPHPPHP ^7.4|^8.0CI failing

Since Mar 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/infinitypaul/laravel-password-history-validation)[ Packagist](https://packagist.org/packages/infinitypaul/laravel-password-history-validation)[ Docs](https://github.com/infinitypaul/laravel-password-history-validation)[ RSS](/packages/infinitypaul-laravel-password-history-validation/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

Laravel Password History Validation
===================================

[](#laravel-password-history-validation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ee36226085d988f1db99eec347076716c4538d0c53bd9ecfcaa2f9710f2aee7f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e66696e6974797061756c2f6c61726176656c2d70617373776f72642d686973746f72792d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/infinitypaul/laravel-password-history-validation)[![Build Status](https://camo.githubusercontent.com/a596600b6cd67a9f39b34a8f69f1d8d653e3ca472ab04af1254126ac20a4f538/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696e66696e6974797061756c2f6c61726176656c2d70617373776f72642d686973746f72792d76616c69646174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/infinitypaul/laravel-password-history-validation)[![Quality Score](https://camo.githubusercontent.com/08253f33abf1bc9ccae2d42f8bdb0cc0982a902106f78fef4a0fa98524f67220/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696e66696e6974797061756c2f6c61726176656c2d70617373776f72642d686973746f72792d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/infinitypaul/laravel-password-history-validation)[![Total Downloads](https://camo.githubusercontent.com/e88f3ec6a10164c665a817f62400603df4bb9e6451b0334bddfafc3b8700ad33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e66696e6974797061756c2f6c61726176656c2d70617373776f72642d686973746f72792d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/infinitypaul/laravel-password-history-validation)

Prevent users from reusing recently used passwords.

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

[](#installation)

You can install the package via composer:

```
composer require infinitypaul/laravel-password-history-validation
```

Configuration
-------------

[](#configuration)

To get started, you'll need to publish the config file, and migrate the database:

```
php artisan vendor:publish --tag=password-config
```

Modify the config file according to your project, then migrate the database

```
php artisan migrate
```

Usage
-----

[](#usage)

This package will observe the created and updated event of the models (check the config file for settings) and records the password hashes automatically.

In Your Form Request or Inline Validation, All You Need To Do Is Instantiate The `NotFromPasswordHistory` class passing the current user as an argument

```
