我正在开发一个用户可以在付款后注册的应用程序,下面是我在 RegisterController
中的创建方法
protected function create(array $data)
{
$payment = $this->MakePayment($data);
if($payment->error)
{
flash($payment->error, 'error')->important();
redirect()->route('register');
}
else
{
//create user and return it
return $user;
}
}
但我得到了例外,而不是返回
(1/1)FatalThrowableError类型错误:传递给Illuminate \ Auth \ SessionGuard :: login()的参数1必须是Illuminate \ Contracts \ Auth \ Authenticatable的实例,null给定,在/ home / tariqmahmood / www / local中调用第35行的.referralfactorypro.com / vendor / laravel / framework / src / Illuminate / Foundation / Auth / RegistersUsers.php
此外,我在重定向后尝试了exit(),它返回注册路由但空屏幕 . 任何人都可以让我知道我做错了什么 .
1 回答
试试这个: