Skip to content

[5.4] Allow a plain text alternative view when using markdown within mailables#19436

Merged
taylorotwell merged 1 commit intolaravel:5.4from
jodiedunlop:5.4
Jun 1, 2017
Merged

[5.4] Allow a plain text alternative view when using markdown within mailables#19436
taylorotwell merged 1 commit intolaravel:5.4from
jodiedunlop:5.4

Conversation

@jodiedunlop
Copy link
Contributor

Currently a mailable class which builds a message with the markdown() method, cannot specify an alternate text version:

return $this->subject($this->subject)
            ->markdown('emails.enquiry')
            ->text('emails.enquiry_plain');  // Currently Ignored

In some cases, even when using the features of markdown to generate the html, you still need an alternate text version.

This PR allows you to optionally specify a text() view in conjunction with a markdown() view, meaning the code above will work.

@jodiedunlop jodiedunlop changed the title Allow a plain text alternative view when using markdown within mailables [5.4] Allow a plain text alternative view when using markdown within mailables Jun 1, 2017
@taylorotwell taylorotwell merged commit 970c722 into laravel:5.4 Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants