An open API service indexing awesome lists of open source software.

https://github.com/hokoo/slackest

Simple Slack integration for PHP - send messages to a slack channel and attach files.
https://github.com/hokoo/slackest

php slack slack-bot

Last synced: 2 months ago
JSON representation

Simple Slack integration for PHP - send messages to a slack channel and attach files.

Awesome Lists containing this project

README

          

# slackest

Simple Slack integration (PHP) for sending messages to a channel and optionally attaching files.

## Installation

```bash
composer require itron/slackest
```

Composer will install the library and register the PSR-4 autoloader for the `iTRON\\Slackest` namespace.

## Usage

```php
send('Hello from Slackest!');

// Send a message with a file attachment
$slack->send('Here is a file', __DIR__ . '/report.pdf');

// Or just upload a file without a message
$slack->sendFile( filePath: __DIR__ . '/report.pdf' );
```

## Requirements

- PHP 7.4 or newer
- cURL extension
- JSON extension
- A Slack bot token with permissions to post messages and upload files.