Laravel unexpected error “class user contains 3 abstract methods…”

前端 未结 8 660
野趣味
野趣味 2021-01-30 01:56

While programming my Authentication app on Laravel, I came across to an error I\'ve never seen before. I\'ve been brainstorming for almost an hour for the cause of this problem

8条回答
  •  Happy的楠姐
    2021-01-30 02:37

    This is an update problem. Laravel force us to update the User.php model with the following code to fix this problem.

    Note: All existing "remember me" sessions will be invalidated by this change, so all users will be forced to re-authenticate with your application.

    public function getRememberToken()
    {
        return $this->remember_token;   
    }
    
    public function setRememberToken($value)
    {
        $this->remember_token = $value;
    } 
    
    public function getRememberTokenName()
    {
        return 'remember_token';
    }
    

提交回复
热议问题