class Content

Traits

Methods

mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

__construct(string|null $view = null, string|null $html = null, string|null $text = null, string|null $markdown = null, array $with = [], string|null $htmlString = null)

Create a new content definition.

view(string $view)

Set the view for the message.

html(string $view)

Set the view for the message.

text(string $view)

Set the plain text view for the message.

markdown(string $view)

Set the Markdown view for the message.

htmlString(string $html)

Set the pre-rendered HTML for the message.

with(array|string $key, mixed $value = null)

Add a piece of view data to the message.

Details

in Conditionable at line 23
mixed when(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) truthy.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

in Conditionable at line 56
mixed unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)

Apply the callback if the given "value" is (or resolves to) falsy.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

at line 23
__construct(string|null $view = null, string|null $html = null, string|null $text = null, string|null $markdown = null, array $with = [], string|null $htmlString = null)

Create a new content definition.

Parameters

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. (Alternative syntax for "view".)

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

array $with

the message's view data

string|null $htmlString

the pre-rendered HTML of the message

at line 36
Content view(string $view)

Set the view for the message.

Parameters

string $view

Return Value

Content

at line 46
Content html(string $view)

Set the view for the message.

Parameters

string $view

Return Value

Content

at line 54
Content text(string $view)

Set the plain text view for the message.

Parameters

string $view

Return Value

Content

at line 64
Content markdown(string $view)

Set the Markdown view for the message.

Parameters

string $view

Return Value

Content

at line 74
Content htmlString(string $html)

Set the pre-rendered HTML for the message.

Parameters

string $html

Return Value

Content

at line 84
Content with(array|string $key, mixed $value = null)

Add a piece of view data to the message.

Parameters

array|string $key
mixed $value

Return Value

Content