After the user has registered, I need to provide a link that the user can use to resend his registration.
How should I pass the token in the link, how do I generate this token?
ex: http://dmain.com/account/confirm/resend/:token
Besides, in RegistersUsers
public function register(RegisterRequest $request)
{
if (config('access.users.confirm_email')) {
$user = $this->user->create($request->all());
event(new UserRegistered($user));
return redirect()->route('frontend.index')->withFlashSuccess(trans('exceptions.frontend.auth.confirmation.resend'));
} else {
auth()->login($this->user->create($request->all()));
event(new UserRegistered(access()->user()));
return redirect($this->redirectPath());
}
}
So, the link is created as:
return redirect()->route('frontend.index')->withFlashSuccess(trans('exceptions.frontend.auth.confirmation.resend'));
How to transfer a token to a trance?
'resend' => 'Your account is not confirmed. Please click the confirmation link in your e-mail, or <a href="' . route('account.confirm.resend', ':token') . '">click here</a> to resend the confirmation e-mail.',
source
share