L
L
larik laravue2019-09-10 13:18:42
Laravel
larik laravue, 2019-09-10 13:18:42

How to painlessly change the entire content of a MailMessage in laravel?

I fill in the parameters of the letter, but unfortunately in the documentation I did not find all the sections of the letter that I need to fill out.

return (new MailMessage)
                    ->subject($this->emailText)
                    ->greeting('Здравствуйте!')
                    ->line($this->emailText.' сформирован.')
                    ->action('Скачать файл', url($pathToExcel))
                    ->salutation('С уважением, команда сервиса .....');

Here is what I was able to find how to fill. But there are two more extra fields that bother me.
EDRYZAI.png
How do I fill in the fields pointed to by the arrow painlessly?
I understand that the top text is taken from .env from the APP_NAME line
. But I need nothing to come out there at all.
Plus, in the footer of the letter, there is a text about what you need to download the attachment.
I found this text in the only place - in the file
vendor\laravel\framework\src\Illuminate\Notifications\resources\views\email.blade.php
But I won't go into the vendor folder and change something there. I would like to set it through the parameters, but I do not see the logic.
Tell me how this is done in general so as not to climb into the vendor.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jazzus, 2019-09-10
@laravue

The command
copies the email here
resources/views/vendor/mail
and can be changed as you like

I
Ilya, 2019-09-10
@New_Horizons

It is possible to override the template with your own view method. Well, make your own based on the built-in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question