我正在运行Laravel 5.3并尝试修改我的注册码以具有激活邮件功能,如下所述:
但我收到错误:
SessionGuard.php第441行中的FatalThrowableError:类型错误:传递给Illuminate \ Auth \ SessionGuard :: login()的参数1必须实现接口Illuminate \ Contracts \ Auth \ Authenticatable,给出Illuminate \ 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;
}
我怎么能克服这个?
谢谢!