Content
class Content (View source)
Traits
Properties
string|null | $view | The Blade view that should be rendered for the mailable. |
|
string|null | $html | The Blade view that should be rendered for the mailable. |
|
string|null | $text | The Blade view that represents the text version of the message. |
|
string|null | $markdown | The Blade view that represents the Markdown version of the message. |
|
string|null | $htmlString | The pre-rendered HTML of the message. |
|
array | $with | The message's view data. |
Methods
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Create a new content definition.
Set the view for the message.
Set the view for the message.
Set the plain text view for the message.
Set the Markdown view for the message.
Set the pre-rendered HTML for the message.
Add a piece of view data to the message.
Details
$this|TWhenReturnType
when($value = null, callable $callback = null, callable $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
$this|TUnlessReturnType
unless($value = null, callable $callback = null, callable $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
__construct(string $view = null, string $html = null, string $text = null, string|null $markdown = null, array $with = [], string $htmlString = null)
Create a new content definition.
$this
view(string $view)
Set the view for the message.
$this
html(string $view)
Set the view for the message.
$this
text(string $view)
Set the plain text view for the message.
$this
markdown(string $view)
Set the Markdown view for the message.
$this
htmlString(string $html)
Set the pre-rendered HTML for the message.
$this
with(string $key, mixed|null $value = null)
Add a piece of view data to the message.