Oct 30, 2016
2
Level 11
How translate or change default reset email text?
Despite all the admiration for the amazing components laravel I must say that one thing I do not like terribly. This is the latest method of logging, reset passwords etc. Why?
- Relatively difficult encapsulated and thus for the novice and intermediate (I) difficult to understand and modify or extend.
- Absolute disaster is the use of user texts (eg. when sending the password reset email), which are located in the vendor folder.
The question is:
- How can I change / translate text into another language based on: vendor / laravel / framework / src / Illuminate / Auth / Notifications / ResetPassword.php?
public function toMail($notifiable)
{
return (new MailMessage)
->line('You are receiving this email because we received a password reset request for your account.')
->action('Reset Password', url('password/reset', $this->token))
->line('If you did not request a password reset, no further action is required.');
}
I do not want the English text, and I want to customize it. I Can rewrite it, but after calling "composer update" to write back to the English.
Indeed very interesting to me if somehow gets "overloaded" method or if there is a simple and functional solution. Because if not, then pay my indignation which I mentioned in the introduction.
Thanks to everyone for your advice and comments.
Please or to participate in this conversation.