SimpleMessage
class SimpleMessage
Properties
| string | $level | The "level" of the notification (info, success, error). |
|
| string|null | $subject | The subject of the notification. |
|
| string|null | $greeting | The notification's greeting. |
|
| string|null | $salutation | The notification's salutation. |
|
| array | $introLines | The "intro" lines of the notification. |
|
| array | $outroLines | The "outro" lines of the notification. |
|
| string|null | $actionText | The text / label for the action. |
|
| string|null | $actionUrl | The action URL. |
|
| string|null | $mailer | The name of the mailer that should send the notification. |
Methods
Indicate that the notification gives information about a successful operation.
Indicate that the notification gives information about an error.
Set the "level" of the notification (success, error, etc.).
Set the subject of the notification.
Set the greeting of the notification.
Set the salutation of the notification.
Add a line of text to the notification.
Add a line of text to the notification if the given condition is true.
Add lines of text to the notification.
Add lines of text to the notification if the given condition is true.
Add a line of text to the notification.
Configure the "call to action" button.
Set the name of the mailer that should send the notification.
Get an array representation of the message.
Details
at line 62
SimpleMessage
success()
Indicate that the notification gives information about a successful operation.
at line 74
SimpleMessage
error()
Indicate that the notification gives information about an error.
at line 86
SimpleMessage
level(string $level)
Set the "level" of the notification (success, error, etc.).
at line 98
SimpleMessage
subject(string $subject)
Set the subject of the notification.
at line 110
SimpleMessage
greeting(string $greeting)
Set the greeting of the notification.
at line 122
SimpleMessage
salutation(string $salutation)
Set the salutation of the notification.
at line 134
SimpleMessage
line(mixed $line)
Add a line of text to the notification.
at line 144
SimpleMessage
lineIf(bool $boolean, mixed $line)
Add a line of text to the notification if the given condition is true.
at line 158
SimpleMessage
lines(iterable $lines)
Add lines of text to the notification.
at line 172
SimpleMessage
linesIf(bool $boolean, iterable $lines)
Add lines of text to the notification if the given condition is true.
at line 186
SimpleMessage
with(mixed $line)
Add a line of text to the notification.
at line 202
protected Htmlable|string
formatLine(array|Htmlable|string|null $line)
Format the given line of text.
at line 220
SimpleMessage
action(string $text, string $url)
Configure the "call to action" button.
at line 233
SimpleMessage
mailer(string $mailer)
Set the name of the mailer that should send the notification.
at line 243
array
toArray()
Get an array representation of the message.