MessageBuilder

class MessageBuilder (View source)

Traits

Macroable

Properties

static protected array $macros The registered string macros. from Macroable
array $elements All of the message elements.

Methods

static void macro(string $name, callable $macro)

Register a custom macro.

from Macroable
static bool hasMacro(string $name)

Checks if macro is registered.

from Macroable
static mixed __callStatic(string $method, array $parameters)

Dynamically handle calls to the class.

from Macroable
mixed __call(string $method, array $parameters)

Dynamically handle calls to the class.

from Macroable
void __construct(string $line)

Create a new message builder instance.

$this line(string $line)

Add a line to the message.

$this action(string $text, string $url)

Add an action to the message.

Details

static void macro(string $name, callable $macro)

Register a custom macro.

Parameters

string $name
callable $macro

Return Value

void

static bool hasMacro(string $name)

Checks if macro is registered.

Parameters

string $name

Return Value

bool

static mixed __callStatic(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

mixed __call(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

void __construct(string $line)

Create a new message builder instance.

Parameters

string $line

Return Value

void

$this line(string $line)

Add a line to the message.

Parameters

string $line

Return Value

$this

$this action(string $text, string $url)

Add an action to the message.

Parameters

string $text
string $url

Return Value

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.6/Illuminate/Notifications/MessageBuilder.html