Spatie\SlashCommand\Response::getPayload PHP Method

getPayload() protected method

protected getPayload ( ) : array
return array
    protected function getPayload() : array
    {
        $payload = ['text' => $this->text, 'channel' => $this->channel, 'link_names' => true, 'unfurl_links' => true, 'unfurl_media' => true, 'mrkdwn' => true, 'response_type' => $this->responseType, 'attachments' => $this->attachments->map(function (Attachment $attachment) {
            return $attachment->toArray();
        })->toArray()];
        if (!empty($this->icon)) {
            $payload[$this->getIconType()] = $this->icon;
        }
        return $payload;
    }