How to customize the email verification email from Laravel 5.7?

前端 未结 8 1552
感动是毒
感动是毒 2020-12-03 02:59

I just upgraded to Laravel 5.7 and now I am using the built in Email Verification. However there is 2 things I have not been able to figure out and the primary issue is how

8条回答
  •  日久生厌
    2020-12-03 03:37

    I think the simple way to do this is to make a new notification using the docs here: https://laravel.com/docs/5.7/notifications#creating-notifications

    Then override the function:

    public function sendEmailVerificationNotification()
    {
        $this->notify(new App\Notifications\CustomEmailNotification);
    }
    

    In the users model.

    Or you can

    php artisan vendor:publish --tag=laravel-notifications
    

    This will copy the templates to the resources/views/vendor/notifications directory and you can modify them there

提交回复
热议问题