Documentation

SimpleMessage
in package

Table of Contents

$actionText  : string
The text / label for the action.
$actionUrl  : string
The action URL.
$greeting  : string
The notification's greeting.
$introLines  : array<string|int, mixed>
The "intro" lines of the notification.
$level  : string
The "level" of the notification (info, success, error).
$outroLines  : array<string|int, mixed>
The "outro" lines of the notification.
$salutation  : string
The notification's salutation.
$subject  : string
The subject of the notification.
action()  : $this
Configure the "call to action" button.
error()  : $this
Indicate that the notification gives information about an error.
greeting()  : $this
Set the greeting of the notification.
level()  : $this
Set the "level" of the notification (success, error, etc.).
line()  : $this
Add a line of text to the notification.
salutation()  : $this
Set the salutation of the notification.
subject()  : $this
Set the subject of the notification.
success()  : $this
Indicate that the notification gives information about a successful operation.
toArray()  : array<string|int, mixed>
Get an array representation of the message.
with()  : $this
Add a line of text to the notification.
formatLine()  : Htmlable|string
Format the given line of text.

Properties

$actionText

The text / label for the action.

public string $actionText

$greeting

The notification's greeting.

public string $greeting

$introLines

The "intro" lines of the notification.

public array<string|int, mixed> $introLines = []

$level

The "level" of the notification (info, success, error).

public string $level = 'info'

$outroLines

The "outro" lines of the notification.

public array<string|int, mixed> $outroLines = []

$salutation

The notification's salutation.

public string $salutation

$subject

The subject of the notification.

public string $subject

Methods

action()

Configure the "call to action" button.

public action(string $text, string $url) : $this
Parameters
$text : string
$url : string
Return values
$this

error()

Indicate that the notification gives information about an error.

public error() : $this
Return values
$this

greeting()

Set the greeting of the notification.

public greeting(string $greeting) : $this
Parameters
$greeting : string
Return values
$this

level()

Set the "level" of the notification (success, error, etc.).

public level(string $level) : $this
Parameters
$level : string
Return values
$this

line()

Add a line of text to the notification.

public line(mixed $line) : $this
Parameters
$line : mixed
Return values
$this

salutation()

Set the salutation of the notification.

public salutation(string $salutation) : $this
Parameters
$salutation : string
Return values
$this

subject()

Set the subject of the notification.

public subject(string $subject) : $this
Parameters
$subject : string
Return values
$this

success()

Indicate that the notification gives information about a successful operation.

public success() : $this
Return values
$this

toArray()

Get an array representation of the message.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

with()

Add a line of text to the notification.

public with(mixed $line) : $this
Parameters
$line : mixed
Return values
$this

formatLine()

Format the given line of text.

protected formatLine(Htmlable|string|array<string|int, mixed> $line) : Htmlable|string
Parameters
$line : Htmlable|string|array<string|int, mixed>
Return values
Htmlable|string

Search results