PHPackages                             lucaterribili/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. lucaterribili/laravel-password-history-validation

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

lucaterribili/laravel-password-history-validation
=================================================

Prevent users from reusing recently used passwords

2.0.0(4y ago)01171MITPHP

Since Mar 11Pushed 4y agoCompare

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

READMEChangelog (1)Dependencies (3)Versions (8)Used By (0)

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

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

[![Latest Version on Packagist](https://camo.githubusercontent.com/5695083c76383e754342ff5996bea68b11a2c1e332de62bc5c0efcea653b5d6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c756361746572726962696c692f6c61726176656c2d70617373776f72642d686973746f72792d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lucaterribili/laravel-password-history-validation)[![Build Status](https://camo.githubusercontent.com/8edcd9e577ded6157d17ddd5eacd821cd199c242bfa60e29423d88f59a503edd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c756361746572726962696c692f6c61726176656c2d70617373776f72642d686973746f72792d76616c69646174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/lucaterribili/laravel-password-history-validation)[![Quality Score](https://camo.githubusercontent.com/9f6431f0dba2e364751185d9cf9487ebfb0b9475d01df50dd582dfae08bd0895/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c756361746572726962696c692f6c61726176656c2d70617373776f72642d686973746f72792d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/lucaterribili/laravel-password-history-validation)[![Total Downloads](https://camo.githubusercontent.com/d2a3f24ecf7d51511dcf6c7b3dc81040c4af7782c410cdfa56e50aa87c7ba3f6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c756361746572726962696c692f6c61726176656c2d70617373776f72642d686973746f72792d76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lucaterribili/laravel-password-history-validation)

Prevent users from reusing recently used passwords.

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

[](#installation)

You can install the package via composer:

```
composer require lucaterribili/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

```
