app/Notifications/ResetPasswordNotification.php
/**
     * Get the mail representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
Get the mail representation of the notification.
@param  mixed  $notifiable
@return \Illuminate\Notifications\Messages\MailMessage
Get the mail representation of the notification . @param mixed $notifiable @return \ Illuminate \ Notifications \ Messages \ MailMessage
public function toMail($notifiable)
    {
        $greeting = sprintf($this->ts('Hello,'));
        $subject = $this->ts('Reset Password');
        $line1 = $this->ts('You are receiving this email because we received a password reset request for your account.');
        $action = $this->ts('Reset Password');
        $url = url(config('app.url').route('password.reset', $this->token, false));
        $line2 = $this->ts('If you did not request a password reset, no further action is required.');
        return (new MailMessage)
                    ->greeting($greeting)
                    ->subject($subject)
                    ->line($line1)
                    ->action($action, $url)
                    ->line($line2);
    }
public function toMail ( $ notifiable ) { $ greeting = sprintf ( $ this -> ts ( 'Hello,' ) ) ; $ subject = $ this -> ts ( 'Reset Password' ) ; $ line1 = $ this -> ts ( 'You are receiving this email because we received a password reset request for your account.' ) ; $ action = $ this -> ts ( 'Reset Password' ) ; $ url = url ( config ( 'app.url' ) . route ( 'password.reset' , $ this -> token , false ) ) ; $ line2 = $ this -> ts ( 'If you did not request a password reset, no further action is required.' ) ; return ( new MailMessage ) -> greeting ( $ greeting ) -> subject ( $ subject ) -> line ( $ line1 ) -> action ( $ action , $ url ) -> line ( $ line2 ) ; }
Get the mail representation of the notification.
Get the mail representation of the notification .
// return (new MailMessage) //             ->line('The introduction to the notification.') //             ->action('Notification Action', url('/')) //             ->line('Thank you for using our application!'); // return (new MailMessage) //     ->line('You are receiving this email because we received a password reset request for your account.') //     ->action('Reset Password', url(config('app.url').route('password.reset', $this->token, false))) //     ->line('If you did not request a password reset, no further action is required.'); // $language = strtolower(App::getLocale()); // if (($language == 'zh-cn') || ($language == 'zh-tw')) { //     $greeting = sprintf('%s %s，', $this->ts('Hello'), $notifiable->name); // Hello Kevin, // } else { //     $greeting = sprintf('%s %s,', $this->ts('Hello'), $notifiable->name); // Hello Kevin, // } // $greeting = sprintf('%s %s,', $this->ts('Hello'), $notifiable->name); // Hello Kevin, /* 默认重置密码邮件的模板位于：resources/views/vendor/notifications/email.blade.php */ // ->salutation('Regards,<br>'.config('app.name'))