一旦我的用户在登录时通过验证,他们会遇到此警告无效的用户凭据,请重试!我不知道该怎么解决这个问题!
if (Auth::attempt(['email' => $request->email, 'password' => $request->pass], true)) {
return redirect()->intended('dashboard');
}我的用户表-
public function up() {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password' , 64);
$table->tinyInteger('verified')->default(0); // this column will be a TINYINT with a default value of 0 , [0 for false & 1 for true i.e. verified]
$table->string('email_token')->nullable(); // this column will be a VARCHAR with no default value and will also BE NULLABLE
$table->rememberToken();
$table->timestamps();
});
}发布于 2017-02-02 22:47:56
正如Siliace所说,你的密码需要加密。您可以通过以下方式进行检查:
dd($request->input('pass'));如果您看到您输入的内容-您需要bcrypt($request->input('pass'));
我不确定,但我想你有$request是请求的实例。因此,对输入字段的访问是:$request->input('email')和$request->input('pass')。
https://stackoverflow.com/questions/42000208
复制相似问题