Laravel,重置密码

时间:2016-05-21 02:30:34

标签: laravel eloquent laravel-5.2

这是我的App / user.php文件:     

    namespace App;

    use Illuminate\Database\Eloquent\Model;
    use Illuminate\Auth\Authenticatable;
    use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
    use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
    class user extends Model implements AuthenticatableContract, CanResetPasswordContract
    {
        //
        use Authenticatable, CanResetPassword;

        public function session(){
            return $this->hasMany("App\session", "userid", "userid");
        }
    }

错误返回: user.php第12行中的FatalErrorException: Trait' App \ CanResetPassword'找不到

帮助我!

1 个答案:

答案 0 :(得分:0)

您希望将use Illuminate\Auth\Passwords\CanResetPassword;添加到文件顶部的其他use语句块中。