Content
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.
from
Conditionable
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.
from
Conditionable
__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.
htmlString(string $html)
Set the pre-rendered HTML for 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.
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.
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.
at line 36
Content
view(string $view)
Set the view for the message.
at line 46
Content
html(string $view)
Set the view for the message.
at line 54
Content
text(string $view)
Set the plain text view for the message.
at line 64
Content
markdown(string $view)
Set the Markdown view for the message.
at line 74
Content
htmlString(string $html)
Set the pre-rendered HTML for the message.
at line 84
Content
with(array|string $key, mixed $value = null)
Add a piece of view data to the message.