laravel 5.4密码重置问题 - 发送电子邮件
经过几个小时的研究,我对如何解决这个相当标准的laravel 5.4实现感到茫然。我添加了一个多auth系统,但我不认为这对正在执行的代码有影响。我正在运行邮寄路线发送电子邮件......但在此之后我迷失了跟踪代码。下面,请查看生成的错误以及其他相关代码。我不确定错误是否在用户模型中,但它当然可以。谢谢你的帮助!!
BadMethodCallException in Builder.php line 2443:Call to undefined method Illuminate\Database\Query\Builder::notify()
1. in Builder.php line 2443
2. at Builder->__call('notify', array(object(ResetPassword))) in Builder.php line 1245
3. at Builder->__call('notify', array(object(ResetPassword))) in Model.php line 1329
4. at Model->__call('notify', array(object(ResetPassword))) in CanResetPassword.php line 27
5. at User->sendPasswordResetNotification('c85443ddc950e30338975234e3ffcd10409efc8c43741e368b3f066398734fd5') in PasswordBroker.php line 70
6. at PasswordBroker->sendResetLink(array('email' => xxx@yahoo.com')) in SendsPasswordResetEmails.php line 33
7. at ForgotPasswordController->sendResetLinkEmail(object(Request))
8. at call_user_func_array(array(object(ForgotPasswordController), 'sendResetLinkEmail'), array('request' => object(Request))) in Controller.php line 55
9. at Controller->callAction('sendResetLinkEmail', array('request' => object(Request))) in ControllerDispatcher.php line 44
10. at ControllerDispatcher->dispatch(object(Route), object(ForgotPasswordController), 'sendResetLinkEmail') in Route.php line 203
11. at Route->runController() in Route.php line 160
12. at Route->run() in Router.php line 559
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use App\User;
class ForgotPasswordController extends Controller
{
use SendsPasswordResetEmails;
public function __construct() { $this->middleware('guest'); }
}
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Contracts\Auth\CanResetPassword; // DOES THIS NEED TO BE REFERENCED SOMEPLACE ELSE?
class User extends Authenticatable
{
use Notifiable;
答案 0 :(得分:0)
我能够回答我自己的问题。好吧,下面的链接没有产生相同的错误,结果是相同的。我创建了另一个控制器并调用忘记密码控制器中调用的相同过程,一切都无缝地工作。
uint32_t result1 = value1/1000;
uint32_t remainder = value1 - result1*1000;
value2 += remainder << 16;
uint32_t result2 = value2/1000;
remainder = value2 - result2*1000;
value3 += remainder << 16;
uint32_t result3 = value3/1000;