| Package Data | |
|---|---|
| Maintainer Username: | antriver |
| Package Create Date: | 2016-10-09 |
| Package Last Update: | 2016-10-09 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-15 03:01:39 |
| Package Statistics | |
|---|---|
| Total Downloads: | 67 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Handles password verification and re-hashing passwords that may be hashed by outdated methods.
composer require tmd/laravel-password-updater
(Overly simplified example.)
<?php
use Tmd\LaravelPasswordUpdater\PasswordHasher;
public function login(PasswordHasher $passwordHasher)
{
/** @var User $user */
$user = User::where('username', $credentials['username'])->first();
if (!$user) {
return ['username' => ['There is no account with that username.']];
}
if (!$passwordHasher->verify($credentials['password'], $user, 'password')) {
return ['password' => ['That password is not correct.']];
}
// Password is correct.
}