PHPackages                             devdasun/password-history - 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. devdasun/password-history

ActiveLibrary

devdasun/password-history
=========================

Prevent users from reusing recent passwords in Laravel

v2.0.1(today)01↑2900%MITPHPPHP ^8.3

Since Jul 30Pushed todayCompare

[ Source](https://github.com/DasunMuthuruwan/laravel-password-history)[ Packagist](https://packagist.org/packages/devdasun/password-history)[ Docs](https://github.com/DasunMuthuruwan/laravel-password-history)[ RSS](/packages/devdasun-password-history/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

laravel-password-history
========================

[](#laravel-password-history)

Prevent users from reusing their recent passwords in a Laravel application. Works with any Eloquent model — `User`, `Admin`, or any custom authenticatable — via a polymorphic history table.

Requirements
------------

[](#requirements)

PackageVersionPHP^8.3Laravel^13.0> For Laravel 12 / PHP 8.2 support, use `^1.0` of this package.

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

[](#installation)

Install via Composer:

```
composer require devdasun/password-history
```

Publish and run the migration:

```
php artisan vendor:publish --tag=password-history-migrations
php artisan migrate
```

Optionally publish the config file:

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

Optionally publish the language file (if you want to customize the validation message):

```
php artisan vendor:publish --tag=password-history-lang
```

Setup
-----

[](#setup)

Add the `HasPasswordHistory` trait to any model you want to track (typically `User`):

```
