Laravel Auth::attempt() always false?

后端 未结 1 1300
时光取名叫无心
时光取名叫无心 2020-12-17 23:18

I recently started learning Laravel (PHP MVC framework) and I\'ve been having a lot of issues with Authenticating a user with: Auth::attempt($credentials).

I\'ll put

1条回答
  •  囚心锁ツ
    2020-12-18 00:15

    I believe the attempt() method will hash the password that is sent in. Seeing as your DB entry's password is 'admin' in plaintext, that would fail. Save your password with Hash::make($password); and i believe your problem should be solved.

    0 讨论(0)
提交回复
热议问题