Here is myscreen shot of database and my login input
public function action(Request $request){
$username = $request->username;
$pass = bcrypt($request->password);
$credentials = [
'id' => $username,
'password' => $pass
];
dd(Auth::attempt($credentials));
if (Auth::attempt(['id' => $username, 'password' => $pass])) {
echo 'Ok';
}else{
echo 'Not ok';
}
I'm trying to make a login action using laravel auth::attempt
but it always return false
.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire