Laravel - Hashing - Determining If A Password Needs To Be Rehashed
The needsRehash
method provided by the Hash
facade allows you to determine if the work factor used by the hasher has changed since the password was hashed. Some applications choose to perform this check during the application's authentication process:
if (Hash::needsRehash($hashed)) {
$hashed = Hash::make('plain-text');
}