PHP code example of bootdesk / chat-sdk-adapter-slack
1. Go to this page and download the library: Download bootdesk/chat-sdk-adapter-slack library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bootdesk / chat-sdk-adapter-slack example snippets
use BootDesk\ChatSDK\Slack\SlackAdapter;
$adapter = new SlackAdapter(
botToken: env('SLACK_BOT_TOKEN'),
httpClient: new \GuzzleHttp\Client,
signingSecret: env('SLACK_SIGNING_SECRET'),
);
// Post a message to a Slack channel
$adapter->postMessage('slack:C1234567890', 'Hello from laravel-bootdesk!');
// Reply in a thread
$adapter->postMessage('slack:C1234567890:1234567890.123456', 'Thread reply');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.