SlackWebhookChannel
in package
Table of Contents
- $http : Client
- The HTTP client instance.
- __construct() : void
- Create a new Slack channel instance.
- send() : ResponseInterface
- Send the given notification.
- attachments() : array<string|int, mixed>
- Format the message's attachments.
- buildJsonPayload() : array<string|int, mixed>
- Build up a JSON payload for the Slack webhook.
- fields() : array<string|int, mixed>
- Format the attachment's fields.
Properties
$http
The HTTP client instance.
protected
Client
$http
Methods
__construct()
Create a new Slack channel instance.
public
__construct(Client $http) : void
Parameters
- $http : Client
Return values
void —send()
Send the given notification.
public
send(mixed $notifiable, Notification $notification) : ResponseInterface
Parameters
- $notifiable : mixed
- $notification : Notification
Return values
ResponseInterface —attachments()
Format the message's attachments.
protected
attachments(SlackMessage $message) : array<string|int, mixed>
Parameters
- $message : SlackMessage
Return values
array<string|int, mixed> —buildJsonPayload()
Build up a JSON payload for the Slack webhook.
protected
buildJsonPayload(SlackMessage $message) : array<string|int, mixed>
Parameters
- $message : SlackMessage
Return values
array<string|int, mixed> —fields()
Format the attachment's fields.
protected
fields(SlackAttachment $attachment) : array<string|int, mixed>
Parameters
- $attachment : SlackAttachment