class SlackChannel

Constants

CONNECTION

The HTTP connection used to send Slack API messages.

Methods

__construct(Factory $http)

Create a new Slack channel instance.

Response|null
send(mixed $notifiable, Notification $notification)

Send the given notification.

array
buildJsonPayload(SlackMessage $message, SlackRoute $route)

Build the JSON payload for the Slack chat.postMessage API.

determineRoute(mixed $notifiable, Notification $notification)

Determine the API Token and Channel that the notification should be posted to.

Details

at line 24
__construct(Factory $http)

Create a new Slack channel instance.

Parameters

Factory $http

at line 32
Response|null send(mixed $notifiable, Notification $notification)

Send the given notification.

Parameters

mixed $notifiable
Notification $notification

Return Value

Response|null

at line 64
protected array buildJsonPayload(SlackMessage $message, SlackRoute $route)

Build the JSON payload for the Slack chat.postMessage API.

Parameters

SlackMessage $message
SlackRoute $route

Return Value

array

at line 76
protected SlackRoute determineRoute(mixed $notifiable, Notification $notification)

Determine the API Token and Channel that the notification should be posted to.

Parameters

mixed $notifiable
Notification $notification

Return Value

SlackRoute