传递给Auth \ SessionGuard :: login()的参数1必须实现接口Auth \ Authenticatable,给出Http \ RedirectResponse的实例

时间:2016-10-26 12:05:46

标签: laravel laravel-5.3

我正在运行Laravel 5.3并尝试修改我的注册码,以便具有以下引用的激活邮件功能:

https://blog.damirmiladinov.com/laravel/laravel-5.2-email-verification-with-activation-code.html#.WBCTI_l946Q

但我收到了错误:

  

SessionGuard.php第441行中的FatalThrowableError:输入错误:参数   1传递给Illuminate \ Auth \ SessionGuard :: login()必须实现   interface Illuminate \ Contracts \ Auth \ Authenticatable,实例   照亮\ Http \ RedirectResponse给出

这是我的创建方法inRegisterController:

protected function create(array $data){
    $user = new RestUser($data);
    $user->register();
    $this->activation->sendActivationMail($user);
    //return redirect('/login')->with('activationStatus', true);
    return redirect('/login')->with('status', 'We sent you an activation code. Check your email.');
    //return $user;
}

我怎么能克服这个?

谢谢!

0 个答案:

没有答案