首页 > 解决方案 > 用户必须实现 CanResetPassword 接口。密码重置 Laravel 5.4

问题描述

password reset issue

User.php

namespace App;
use Eloquent;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Auth\Authenticatable as AuthenticableTrait;

类用户扩展 Eloquent 实现 Authenticatable { 使用 AuthenticableTrait;

标签: phplaravel

解决方案


将接口 CanResetPassword 添加到您的 User 类:

// at the top of the file
use Illuminate\Auth\Passwords\CanResetPassword;

// at the class declaration
class User extends Eloquent implements Authenticatable, CanResetPassword
{
    // ...
}

推荐阅读