doubo3384 2016-12-30 04:11
浏览 68
已采纳

这些凭据与我们的记录laravel 5.3不符

What i want

I wanted to use the laravel authentication system that has been obtained by using php artisan make:auth command


what happened

  • I can see the items that is registered by the register form but i am not able to log in through the app with those credentials.
  • Error:These credentials do not match our records.

What i did

php artisan make:Auth

User.php

namespace App;

use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Auth\Authenticatable as AuthenticatableTrait;

use Illuminate\Database\Eloquent\Model;
class User extends Model implements Authenticatable 
{
    protected $fillable=['name','password','email'];
    protected $table='blog_users';


    public function getAuthIdentifierName(){}
    public function getAuthIdentifier(){}
    public function getAuthPassword(){}
    public function getRememberToken(){}
    public function setRememberToken($value){}
    public function getRememberTokenName(){}
}

What i tried

I tried to provide my action methods but i still cannot log in through these credentials and i still see the same error.


What i hope

To get a better understanding about my problem and the solution about it?


Snapshots

enter image description here enter image description here

  • 写回答

2条回答 默认 最新

  • dongping1012 2016-12-30 05:22
    关注

    This is what my Laravel 5.3 User model looked like:

    <?php
    
    namespace App;
    
    use Illuminate\Notifications\Notifiable;
    use Illuminate\Foundation\Auth\User as Authenticatable;
    
    class User extends Authenticatable
    {
        use Notifiable;
    
        /**
         * The attributes that are mass assignable.
         *
         * @var array
         */
        protected $fillable = [
            'name', 'email', 'password',
        ];
    
        /**
         * The attributes that should be hidden for arrays.
         *
         * @var array
         */
        protected $hidden = [
            'password', 'remember_token',
        ];
    }
    

    I would assume all those empty methods would be causing problems for you.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100