Laravel

How To Fix: "Could not verify the hashed value's configuration."

If you come across the error message "Could not verify the hashed value's configuration" in Laravel, it suggests there may be an issue in the hashed password configuration. This situation commonly arises during database seeding or testing.

If you have just upgraded to Laravel 11 then you will need to remove the old hardcoded hased "password" from your User's factory and this hashed version of password will no longer match the version returned from Hash::make('password')

Fixing the Issue:

To fix the issue, make sure that the hashed password in your UserFactory is generated using Laravel's Hash::make method or bcrypt. Replace the existing hard-coded hash ID password with the following code snippet:

use Illuminate\Support\Facades\Hash;

//...

public function definition(): array 
{
    return [
        // 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 
        'password' => Hash::make('password'), 
    ];
}

Copyright © 2024 | bonnick.dev