그냥 머리까지 : 당신이 통지 라인 등 You are receiving this...
같은을 수정하려면 이전의 대답에 추가하여, 다음을 단계별로 설명 추가 단계가 있습니다.
User
모델의 경우 override the defaultsendPasswordResetNotification
방법이 필요합니다.
왜? 선은 Illuminate\Auth\Notifications\ResetPassword.php
에서 가져 왔기 때문입니다. 핵심 부분을 수정하면 Laravel을 업데이트하는 동안 변경 사항이 손실됩니다.
이렇게하려면 User
모델에 다음을 추가하십시오.
use App\Notifications\PasswordReset; // Or the location that you store your notifications (this is default).
/**
* Send the password reset notification.
*
* @param string $token
* @return void
*/
public function sendPasswordResetNotification($token)
{
$this->notify(new PasswordReset($token));
}
마지막으로, create that notification :
/**
* The password reset token.
*
* @var string
*/
public $token;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($token)
{
$this->token = $token;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Build the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->line('You are receiving this email because we received a password reset request for your account.') // Here are the lines you can safely override
->action('Reset Password', url('password/reset', $this->token))
->line('If you did not request a password reset, no further action is required.');
}
이메일 템플릿은 내부 자원/뷰/공급 업체/알림 폴더가 될 것입니다. – KCP
전체 답변은 https://stackoverflow.com/a/41401524/2144424라고 생각합니다. – jpussacq