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 60
SimpleMessage
success()
Indicate that the notification gives information about a successful operation.
at line 70
SimpleMessage
error()
Indicate that the notification gives information about an error.
at line 80
SimpleMessage
level(string $level)
Set the "level" of the notification (success, error, etc.).
at line 90
SimpleMessage
subject(string $subject)
Set the subject of the notification.
at line 100
SimpleMessage
greeting(string $greeting)
Set the greeting of the notification.
at line 110
SimpleMessage
salutation(string $salutation)
Set the salutation of the notification.
at line 120
SimpleMessage
line(mixed $line)
Add a line of text to the notification.
at line 128
SimpleMessage
lineIf(bool $boolean, mixed $line)
Add a line of text to the notification if the given condition is true.
at line 140
SimpleMessage
lines(iterable $lines)
Add lines of text to the notification.
at line 152
SimpleMessage
linesIf(bool $boolean, iterable $lines)
Add lines of text to the notification if the given condition is true.
at line 164
SimpleMessage
with(mixed $line)
Add a line of text to the notification.
at line 180
protected Htmlable|string
formatLine(array|Htmlable|string|null $line)
Format the given line of text.
at line 196
SimpleMessage
action(string $text, string $url)
Configure the "call to action" button.
at line 207
SimpleMessage
mailer(string $mailer)
Set the name of the mailer that should send the notification.
at line 217
array
toArray()
Get an array representation of the message.