PHPackages                             package-for-laravel/legacy-passwords - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. package-for-laravel/legacy-passwords

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

package-for-laravel/legacy-passwords
====================================

Toolset to migrate legacy passwords to your current laravel project

3.0.1(6y ago)2269MITPHPPHP ^7.1

Since Nov 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/package-for-laravel/legacy-passwords)[ Packagist](https://packagist.org/packages/package-for-laravel/legacy-passwords)[ RSS](/packages/package-for-laravel-legacy-passwords/feed)WikiDiscussions master Synced yesterday

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

Laravel Legacy Passwords
========================

[](#laravel-legacy-passwords)

```
ARCHIVED: This project is archived and no longer maintained.

```

This is a tool to migrate legacy passwords in your application to the standard Laravel install. This is particularly useful when you're rewriting a project into Laravel, but you don't want to have users have to reset their password.

Install
-------

[](#install)

This project requires Laravel 5.8+.

`composer require package-for-laravel/legacy-passwords`

Then, run your migrations (this package registers some)

`artisan migrate`

Next, find your user model (this package is configured that you use the default setup of the `users` table - but it doesn't matter where your user model is or what it's named) and use the `PackageForLaravel\LegacyPasswords\HasLegacyPassword` trait. Also implement the `PackageForLaravel\LegacyPasswords\HasLegacyPasswordContract`.

```
use PackageForLaravel\LegacyPasswords\HasLegacyPasswordContract;
use PackageForLaravel\LegacyPasswords\HasLegacyPassword;

class User extends Authenticatable implements HasLegacyPasswordContract
{
  use HasLegacyPassword;

```

Create a Legacy Password Authentication Strategy, implement `PackageForLaravel\LegacyPasswords\LegacyPasswordAuthenticationStrategyContract`

Here's an example; Let's assume our old system was plain md5.

```
use PackageForLaravel\LegacyPasswords\LegacyPasswordAuthenticationStrategyContract;

class MyLegacyPasswordAuthenticationStrategy implements LegacyPasswordAuthenticationStrategyContract
{
    public function validateCredentials(Authenticatable $user, array $credentials): bool
    {
        $password = $credentials['password'];
        $hashed = md5($password);

        return $user->legacyPassword->data['md5'] === $hashed;
    }
}
```

Then, bind that into Laravel. For example, you might do this in the `AuthServiceProvider`:

```
$this->app->bind(LegacyPasswordAuthenticationStrategyContract::class, function() {
    return new MyLegacyPasswordAuthenticationStrategy();
});

```

Remember, you can inject requirements into your strategy here if you need to.

Finally, modify your `config/auth.php` key `providers.users.driver` to be `laravel-legacy-passwords` so that we can inject this authentication system instead of the standard one.

How do you create the legacy passwords? Easy. Something like this:

```
$user = User::create(); // you created this with your legacy data
$user->legacyPassword()->create([
    'data' => [
        'md5' => $oldUser['md5']
    ]
]);

```

You can include anything you need for your strategy in the `data` key.

Credits
-------

[](#credits)

This package is created and maintained by [Aaron Saray](https://github.com/aaronsaray)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~57 days

Total

6

Last Release

2446d ago

Major Versions

1.0.1 → 2.0.02019-05-30

2.0.1 → 3.0.02019-09-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a9ad2a426eb84bbb6d5fd7f8a9000797796581c2aeda0d27b39391e55c0e7a3?d=identicon)[aaronsaray](/maintainers/aaronsaray)

---

Top Contributors

[![aaronsaray](https://avatars.githubusercontent.com/u/956888?v=4)](https://github.com/aaronsaray "aaronsaray (17 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/package-for-laravel-legacy-passwords/health.svg)

```
[![Health](https://phpackages.com/badges/package-for-laravel-legacy-passwords/health.svg)](https://phpackages.com/packages/package-for-laravel-legacy-passwords)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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