class SlackAttachment

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.

string $imageUrl

The attachment's image url.

$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|string $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
image(string $url)

Set the image URL.

$this
footer(string $footer)

Set the footer content.

$this
footerIcon(string $icon)

Set the footer icon.

$this
timestamp(Carbon $timestamp)

Set the timestamp.

Details

at line 93
$this title(string $title, string $url = null)

Set the title of the attachment.

Parameters

string $title
string $url

Return Value

$this

at line 107
$this content(string $content)

Set the content (text) of the attachment.

Parameters

string $content

Return Value

$this

at line 120
$this fallback(string $fallback)

A plain-text summary of the attachment.

Parameters

string $fallback

Return Value

$this

at line 133
$this color(string $color)

Set the color of the attachment.

Parameters

string $color

Return Value

$this

at line 147
$this field(Closure|string $title, string $content = '')

Add a field to the attachment.

Parameters

Closure|string $title
string $content

Return Value

$this

at line 170
$this fields(array $fields)

Set the fields of the attachment.

Parameters

array $fields

Return Value

$this

at line 183
$this markdown(array $fields)

Set the fields containing markdown.

Parameters

array $fields

Return Value

$this

at line 196
$this image(string $url)

Set the image URL.

Parameters

string $url

Return Value

$this

Set the footer content.

Parameters

string $footer

Return Value

$this

at line 222
$this footerIcon(string $icon)

Set the footer icon.

Parameters

string $icon

Return Value

$this

at line 235
$this timestamp(Carbon $timestamp)

Set the timestamp.

Parameters

Carbon $timestamp

Return Value

$this