the Laravel Auth::attempt function fails always. But i can't find any other method to authenticate the user or the false code... I checked the Input from my Form with an echo in the following if condition ( else part, because the true condition never entered).
public function postSignIn(Request $request)
{
$email=$request['email'];
$password=$request['password'];
$remember=$request['remember'];
if(Auth::attempt(['email' => $email, 'password' => $password])){
return redirect()->route('dashboardStart');
}
return redirect()->back();
}
The password is hashed by the normal laravel hash function and saved to the database.
$pw=Hash::make($pw1);
to store pw and email
$user->Email=$email;
$user->Password=$pw;
//writes the data to the DB
$user->save();
So, hope someone can help me.
EDIT 2:
Ok that's crazy... I changed the validation function and validate the email and password with the normal php function and the condition is true...
if(($email===$userDBEntry['Email'])&&password_verify($password, $userDBEntry['Password'])){
return redirect()->route('dashboardStart');
}
return redirect()->back();