N
N
Netroman2019-08-11 00:11:55
Laravel
Netroman, 2019-08-11 00:11:55

Laravel changing standard mail?

Used the standard form Auth laravel'a. To send a follow-up email, follow the link

resend

1) Is this transition protected from spam, maybe it’s worth it to validate it somehow or even create your own letter?
2) I want to send an email after some logic described in the controller. How can i do this? Of course, I can send my letter with a newly generated link, but can I somehow use the already prepared one? (I just don't understand how to do it in the controller)
3) I sent a letter and there is a standard template, can it be changed somehow? (Exactly for standard laravel templates), how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-08-12
@xa3apg

You use your trait in the user based on the original Illuminate\Contracts\Auth\MustVerifyEmail .
Then you create your Notification with the body of the letter you need and write it in your trait instead of the original .
After the logic you need in the controller, just call this method on the user

<?php
...
Auth::user()->sendEmailVerificationNotification();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question