调用未定义的方法Illuminate \ Database \ Query \ Builder :: notify() [英] Call to undefined method Illuminate\Database\Query\Builder::notify()

查看:68
本文介绍了调用未定义的方法Illuminate \ Database \ Query \ Builder :: notify()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在忘记密码"中提交请求时,在 Laravel 5.3.6 中发布.

Issue in Laravel 5.3.6 when submitted request in Forgot Password.

错误详细信息

调用未定义的方法Illuminate \ Database \ Query \ Builder :: notify()

Call to undefined method Illuminate\Database\Query\Builder::notify()

问题在下面的文件中:

vendor \ laravel \ framework \ src \ Illuminate \ Auth \ Passwords \ PasswordBroker.php

vendor\laravel\framework\src\Illuminate\Auth\Passwords\PasswordBroker.php

第69行.代码在下面

$user->sendPasswordResetNotification(
    $this->tokens->create($user)
);

功能:sendResetLink

Laravel 5.2 中运行正常,并且在 5.3.6 版本中似乎无法正常运行.您遇到过这个问题吗?

It was working fine in Laravel 5.2 and seems not working in 5.3.6 version. Have you faced this issue?

推荐答案

必须在User模型中添加Illuminate\Notifications\Notifiable特征.

You must add Illuminate\Notifications\Notifiable trait in User model.

这篇关于调用未定义的方法Illuminate \ Database \ Query \ Builder :: notify()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆