Answer the question
In order to leave comments, you need to log in
How to generate a link to confirm registration?
I customize registration in version 5.7
Overridden the method in the User class
public function sendEmailVerificationNotification()
{
$this->notify(new CustomVerifyEmail);
}
http://localhost/email/verify/7?expires=1559851687&signature=
f2ce7be49045c1c86314a2d8d0229ebf2322452460607803cb1b002a470c9309
http://localhost/email/verify
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class CustomVerifyEmail extends Notification
{
use Queueable;
public function via($notifiable)
{
return ['mail'];
}
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Уведомление для подтверждения регистрации')
->salutation('С уважением, администрация сайта.')
->line('Что бы использовать дополнительные возможности сайта, надо подтвердить регистацию')
->action('Подтвердить пароль', url('email/verify'))
->line('Срок действия ссылки для подтверждения пароля истекает через 60 минут.');
}
public function toArray($notifiable)
{
return [
//
];
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question