class SlackWebhookChannel

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

at line 26
void __construct(Client $http)

Create a new Slack channel instance.

Parameters

Client $http

Return Value

void

at line 38
ResponseInterface send(mixed $notifiable, Notification $notification)

Send the given notification.

Parameters

mixed $notifiable
Notification $notification

Return Value

ResponseInterface

at line 55
protected array buildJsonPayload(SlackMessage $message)

Build up a JSON payload for the Slack webhook.

Parameters

SlackMessage $message

Return Value

array

at line 79
protected array attachments(SlackMessage $message)

Format the message's attachments.

Parameters

SlackMessage $message

Return Value

array

at line 104
protected array fields(SlackAttachment $attachment)

Format the attachment's fields.

Parameters

SlackAttachment $attachment

Return Value

array