Sorry for broken english.
I try to login using auth::attempt in laravel, but the return is always wrong password.
my password is
12345
here's my code :
if ($validator->fails())
{
$result = array('msg' => 'Username tidak tersedia !');
}
else
{
if (Auth::attempt(['username' => $request->username, 'password' => $request->password]))
{
$result = array('msg' => 'success');
}
else
{
$result = array('msg' => 'Password tidak benar, silakan ulangi !');//wrong password
}
}
//return message to view
echo json_encode($result);
what is the format of auth::attempt ? is it hashing ?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2yVg1QL
via IFTTT
Aucun commentaire:
Enregistrer un commentaire