Encryption disappears when adding a column.
When adding a column User Encryption is disabled, it does not work, and when logging in, a message appears that the password is incorrect.
12 Replies
Please provide more details with what you mean]
When I added a field to the Users table, the encryption process disappeared. When I log in, even though I added the correct email and password, it does not register me to the control panel, and when I add a new user, it is sent to the database without the password encryption process.
So... the only want the encryption will dissapear is if you are not doing it.....
I asume you built a users recourse
I have modified the user table structure.
The table doesn't dictate the encryption casting, that's handled as part of the save method.
either in the model or on the resource/page.
I know, but the code did not work when I modified the structure of the table, nor did it work before, until I modified the structure of the table. It crashed.
So provide the previous code and the new code.
Okay but it has changed The model User specific
If you ensure the model has:
protected $casts = [
'password'=> 'hashed',
];
it will has the password...
Medium
Automatically Hash Laravel Model Values Using the “Hashed” Cast
And how to write tests for your hashed model values
Thank you brother, you worked well with me.
I want to show a login interface that I have prepared myself
I have set it up and displayed it, but when I press login, it does not access the control panel, and also the color of the The password and username are white.
Please open a new thread for every question and provide some code.