SlackAttachment

class SlackAttachment (View source)

Properties

string $title The attachment's title.
string $url The attachment's URL.
string $content The attachment's text content.
string $fallback A plain-text summary of the attachment.
string $color The attachment's color.
array $fields The attachment's fields.
array $markdown The fields containing markdown.
$footer The attachment's footer.
string $footerIcon The attachment's footer icon.
int $timestamp The attachment's timestamp.

Methods

$this title(string $title, string $url = null)

Set the title of the attachment.

$this content(string $content)

Set the content (text) of the attachment.

$this fallback(string $fallback)

A plain-text summary of the attachment.

$this color(string $color)

Set the color of the attachment.

$this field(Closure|array $title, string $content = '')

Add a field to the attachment.

$this fields(array $fields)

Set the fields of the attachment.

$this markdown(array $fields)

Set the fields containing markdown.

$this footer(string $footer)

Set the footer content.

$this footerIcon(string $icon)

Set the footer icon.

$this timestamp(Carbon $timestamp)

Set the timestamp.

Details

$this title(string $title, string $url = null)

Set the title of the attachment.

Parameters

string $title
string $url

Return Value

$this

$this content(string $content)

Set the content (text) of the attachment.

Parameters

string $content

Return Value

$this

$this fallback(string $fallback)

A plain-text summary of the attachment.

Parameters

string $fallback

Return Value

$this

$this color(string $color)

Set the color of the attachment.

Parameters

string $color

Return Value

$this

$this field(Closure|array $title, string $content = '')

Add a field to the attachment.

Parameters

Closure|array $title
string $content

Return Value

$this

$this fields(array $fields)

Set the fields of the attachment.

Parameters

array $fields

Return Value

$this

$this markdown(array $fields)

Set the fields containing markdown.

Parameters

array $fields

Return Value

$this

Set the footer content.

Parameters

string $footer

Return Value

$this

$this footerIcon(string $icon)

Set the footer icon.

Parameters

string $icon

Return Value

$this

$this timestamp(Carbon $timestamp)

Set the timestamp.

Parameters

Carbon $timestamp

Return Value

$this

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