Changing default encrypted user password to plaintext


The default user password in the “UsersTableSeeder.php” is in an encrypted format instead of plaintext. What encryption has been used for it in the Laravel-Core-UI-AdminPanel? If I want to change it to a plaintext of my choice, would I have to change the type of encryption anywhere?
UPDATE: I changed the encrypted password to plaintext and ran (lets keep the user as ‘user’ and plaintext password as ‘pass’:
php artisan migrate:refresh --seed

my users table in the database shows user: user and password: pass.

But when i use these credentials, it says ‘invalid credentials’. From my understanding, it is hashing my password and checking whether the hash matches with the password in DB but ofc. the hashed value will not be equal to ‘pass’. How do I make it compare it with the password as it is from the database instead of hashing it and then verifying?

(This is for testing purpose. I do understand that storing passwords in plaintext form is not safe).

Thanks in advance :slight_smile:

If you need use some other passwords in seeder then use
use Illuminate\Support\Facades\Hash;
$password = Hash::make('password')
For testing only: You can add one more column to the User table to keep your plaintext password there.

1 Like

@rakieta2015 oh thanks a lot :slight_smile: . So the idea behind this solution is that I don’t have to use a plaintext p/w in the database and instead i can view it inside => Hash::make(‘myPassword’) is it?

This is how it should work. I think it’s a good solution when you want to initiate a project with a super admin account, for example.

1 Like