First please excuse my English, I'm french... Also, I must admit that I'm not a pro developer. The reason why I'm here.
I'm trying to build a Laravel app based on an existing database. The original app was built with Java, but I prefer Laravel.
I've installed Laravel UI which seems to work fine for the registration but when I try to log in with an imported user from the original database I get this error message "These credentials do not match our records" regarding the email I use.
I use the User model with : protected $table = 'my_users_table';
I tried to do this on auth.php
'users' => [
'driver' => 'database',
'table' => 'my_users_table',
],
But nothing worked. I'm sure I forgot something, but I don't know what...
Thank you all
CodePudding user response:
Laravel uses bcrypt() function to encrypt given password on login and register. To encrypt, laravel uses APP_KEY. If the imported user were imported in Java end, it's possible, that Java encrypted the password with different sault
CodePudding user response:
Try with this code...
$insert = array(
'email' => '[email protected]',
'password' => bcrypt('password'),
);
User::create($insert);
Then try to login your credentials.
Hope it will helps you to solve your query!!
Cheers mate!!!