SlackWebhookChannel

class SlackWebhookChannel (View source)

Properties

protected Client $http The HTTP client instance.

Methods

void __construct(Client $http)

Create a new Slack channel instance.

ResponseInterface send(mixed $notifiable, Notification $notification)

Send the given notification.

array buildJsonPayload(SlackMessage $message)

Build up a JSON payload for the Slack webhook.

array attachments(SlackMessage $message)

Format the message's attachments.

array fields(SlackAttachment $attachment)

Format the attachment's fields.

Details

void __construct(Client $http)

Create a new Slack channel instance.

Parameters

Client $http

Return Value

void

ResponseInterface send(mixed $notifiable, Notification $notification)

Send the given notification.

Parameters

mixed $notifiable
Notification $notification

Return Value

ResponseInterface

protected array buildJsonPayload(SlackMessage $message)

Build up a JSON payload for the Slack webhook.

Parameters

SlackMessage $message

Return Value

array

protected array attachments(SlackMessage $message)

Format the message's attachments.

Parameters

SlackMessage $message

Return Value

array

protected array fields(SlackAttachment $attachment)

Format the attachment's fields.

Parameters

SlackAttachment $attachment

Return Value

array

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