As i said in the comment and i just tested it on my local pc, maybe it's wrong to you but for me it doesn't work if i use plain password save in database, here's my register file
protected function create(array $data) { $activation_code = str_random(60); $user = User::create([ 'username' => $data['username'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'activation_code' => $activation_code ]); if ($user->save()) { $data = array( 'name' => $user->username, 'code' => $activation_code, ); \Mail::queue('emails.activate', $data, function($message) use ($user) { $message->to($user->email)->subject('Thank you for registering. Please activate your account!'); }); } return $user; }
you see i have crypted password
'password' => bcrypt($data['password']),
and if i test it just with:
'password' =>$data['password'],
The registration works but authentication fails because password must be encripted you should also remove Auth::login(Auth::user()); that is not necessary
if (Auth::attempt(['email' => $_email, 'password' => $_password])) { return redirect()->intended('/dashboard'); }
This happens on my site when i don't use bcrypt on password in registration controller and try to login later
Whoops! There were some problems with your input. These credentials do not match our records.
Also what i have seen from our login form inputs are not emaillogin and passwordlogin they are just email and password
$_email = $request->input('email');since name of your email field in form isemailalso you must use bcrypt on password field upon registration, check my answer for more details .