Skip to content
Advertisement

Custom verificarion email in laravel issue

guys in my laravel application i’m trying to send my users a custom verification email, as i’m using language translations

So as the first step I’ve created following custom email template in my App/Notifications folder CustomVerifyEmailNotification.php

JavaScript

and following is my User.php

JavaScript

How can I inject my custom email template here?

I’m using laravel 6 and following is my MustVerifyEmail.php trait

JavaScript

Current verification process works properly but I need to send that customized email to my users.

Advertisement

Answer

Now you have to ovewrite sendEmailVerificationNotification() function in order to use your Notification CustomVerifyEmailNotification.

So, in your User.php you have to write a function sendEmailVerificationNotification like:

JavaScript

Then you can customize the email in your custom notification

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement