PHP client to send messages to a Mattermost webhook.
See https://docs.mattermost.com/developer/webhooks-incoming.html for the documentation of the incoming webhook of Mattermost.
Install the latest version via composer:
php composer.phar require nutama/mattermost-webhook
Example:
<?php
require_once('vendor/autoload.php');
$webhook_uri = 'http://{your-mattermost-site}/hooks/xxx-generatedkey-xxx';
$client = new \GuzzleHttp\Client(['base_uri' => $webhook_uri]);
$mattermost_webhook = new \Nutama\MattermostWebhook\MattermostWebhook($client);
$message = new \Nutama\MattermostWebhook\Message('message');
$mattermost_webhook->send($message);
PHP 7.0.x or above.
This library is licensed under the MIT License - see the LICENSE file for details.