I've problem with password laravel. I use bcrypt hash for my password and I use this method foe login:
$email = $request->input('u_email');
$password = $request->input('pwd1');
// Check validation
if (auth()->attempt(['u_email' => $email, 'password' => $password] )) {
echo "ok";
} else {
echo "error";
}
This problem with code, It's recognize my password stored in database.And I use this second method but same problem
$checkLogin = DB::table('users')->where(['u_email'=>$email,'password'=>$password])->get();
if(count($checkLogin) >0) {
echo "Login SuccessFull<br/>";;
}else{
echo "Login Faield Wrong Data Passed";
}
Thank you
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qk8nNr
via IFTTT
Aucun commentaire:
Enregistrer un commentaire