SlackMessage
class SlackMessage
Properties
| string | $level | The "level" of the notification (info, success, warning, error). |
|
| string|null | $username | The username to send the message from. |
|
| string|null | $icon | The user emoji icon for the message. |
|
| string|null | $image | The user image icon for the message. |
|
| string|null | $channel | The channel to send the message on. |
|
| string|null | $content | The text content of the message. |
|
| bool | $linkNames | Indicates if channel names and usernames should be linked. |
|
| bool | $unfurlLinks | Indicates if a preview of links should be inlined in the message. |
|
| bool | $unfurlMedia | Indicates if a preview of links to media should be inlined in the message. |
|
| array | $attachments | The message's attachments. |
|
| array | $http | Additional request options for the Guzzle HTTP client. |
Methods
Indicate that the notification gives information about an operation.
Indicate that the notification gives information about a successful operation.
Indicate that the notification gives information about a warning.
Indicate that the notification gives information about an error.
Set a custom username and optional emoji icon for the Slack message.
Set a custom image icon the message should use.
Set the Slack channel the message should be sent to.
Set the content of the Slack message.
Get the color for the message.
Find and link channel names and usernames.
Unfurl links to rich display.
Unfurl media to rich display.
Set additional request options for the Guzzle HTTP client.
Details
at line 69
SlackMessage
info()
Indicate that the notification gives information about an operation.
at line 79
SlackMessage
success()
Indicate that the notification gives information about a successful operation.
at line 89
SlackMessage
warning()
Indicate that the notification gives information about a warning.
at line 99
SlackMessage
error()
Indicate that the notification gives information about an error.
at line 109
SlackMessage
from(string $username, string|null $icon = null)
Set a custom username and optional emoji icon for the Slack message.
at line 123
SlackMessage
image(string $image)
Set a custom image icon the message should use.
at line 133
SlackMessage
to(string $channel)
Set the Slack channel the message should be sent to.
at line 143
SlackMessage
content(string $content)
Set the content of the Slack message.
at line 153
SlackMessage
attachment(Closure $callback)
Define an attachment for the message.
at line 165
string|null
color()
Get the color for the message.
at line 182
SlackMessage
linkNames()
Find and link channel names and usernames.
at line 192
SlackMessage
unfurlLinks(bool $unfurlLinks)
Unfurl links to rich display.
at line 202
SlackMessage
unfurlMedia(bool $unfurlMedia)
Unfurl media to rich display.
at line 212
SlackMessage
http(array $options)
Set additional request options for the Guzzle HTTP client.