PHP code example of fintech-systems / slack-php-api

1. Go to this page and download the library: Download fintech-systems/slack-php-api 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/ */

    

fintech-systems / slack-php-api example snippets




use FintechSystems\Slack\Slack;

le(__DIR__);
$dotenv->load();

$server = [
    'bot_token'  => $_ENV['SLACK_BOT_TOKEN'],
    'user_token' => $_ENV['SLACK_USER_TOKEN'],
    'channel'    => $_ENV['SLACK_CHANNEL'],
];

$api = new Slack($server);


return [
    'bot_token'  => env('SLACK_BOT_TOKEN'),
    'user_token' => env('SLACK_USER_TOKEN'),
    'channel'    => env('SLACK_CHANNEL'),
];


use FintechSystems\LaravelApiHelpers\Api;

$api = new Api();

$postData = [
  'channel'   => 'C02G5QS8ANA',
  'text'      => '*Joe Smith*/27823096710: how are you',
  'thread_ts' => '1635100445.007500',
];

$result = $api->postMessage($postData);

public function postMessage(String $postFields)
public function makeImagePublic($id)
public function reconstructImageUrl($filesZero)
bash
php artisan vendor:publish --provider="FintechSystems\Slack\SlackServiceProvider" --tag="slack-config"
json
"fintech-systems/slack-php-api": "dev-main",