protected function verificationUrl($notifiable) {
return URL::temporarySignedRoute(
'verification.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey()]
);
}
此函数用于创建基于
$notifiable
$this->verificationUrl($notifiable)
我没有成功,使这个网址和实际电子邮件验证与其他工作
redirectTo
参数。每当我试图添加这个参数时,所有的验证过程都会停止。只是感觉不允许有额外的东西。
我可以存储一个cookie,它将在验证后使用,但是,有没有技术上更正确的方法来使用它
VerificationController
protected $redirectTo = '/';
public function __construct() {
$this->middleware('auth');
$this->middleware('signed')->only('verify');
$this->middleware('throttle:6,1')->only('verify', 'resend');
}
尝试:
protected function verificationUrl($notifiable) {
return URL::temporarySignedRoute(
'verification.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey()]
).'&redirectTo=https://root.loc/whatever';
}
我甚至尝试解析生成的URL(没有附加参数),并在其他位置插入。然而,仍然没有成功。