Content
class Content (View source)
Traits
Properties
Methods
$this|TWhenReturnType
when($value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
from
Conditionable
$this|TUnlessReturnType
unless($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.
$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(array|string $key, mixed|null $value = null)
Add a piece of view data to the message.
Details
$this|TWhenReturnType
when($value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
$this|TUnlessReturnType
unless($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.