carpediem/mattermost-webhook mattermost notification using webhooks in PHP.

Introduction Software License

carpediem/mattermost-webhook is a simple library to ease sending incoming webhooks to Mattermost compliant services.

Highlights

Build status

branch status minimum PHP version
master Build Status PHP 7.0
1.x Build Status PHP 5.6

Basic usage

The code below will send a mattermost notification

<?php

require '/path/to/vendor/autoload.php';

use GuzzleHttp\Client as GuzzleClient;
use Carpediem\Mattermost\Webhook\Client;
use Carpediem\Mattermost\Webhook\Message;

$mattermost = new Client(new GuzzleClient());
$message = new Message('This is a *test*.');
$response = $mattermost->notify('https://your_mattermost_webhook_url', $message);

//$response is a Psr7\Http\Message\ResponseInterface.

Credits

This package is a fork from ThibaudDauce/mattermost-php improved by Carpediem

License

The MIT License (MIT). Please see LICENSE for more information.