1. Go to this page and download the library: Download brunospy/mattermostmodule library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
brunospy / mattermostmodule example snippets
echo$this->headLink()
->appendStylesheet($this->basePath() . '/<path to your bootstrap>/bootstrap.min.css')
->appendStylesheet($this->basePath() . '/assets/css/font-awesome.all.min.css')
->appendStylesheet($this->basePath() . '/assets/css/mattermostchat.css');
echo$this->headScript()
->appendFile($this->basePath() . '/<path to your jquery>/jquery.min.js')
->appendFile($this->basePath() . '/<path to your jquery-ui>/jquery-ui.min.js')
->appendFile($this->basePath() . '/<path to your bootstrap>/bootstrap.min.js')
->appendFile($this->basePath() . '/<path to your momentjs>/moment.min.js')
->appendFile($this->basePath() . '/<path to your list.js>/list.min.js')
->appendFile($this->basePath() . '/<path to your marked.js>/marked.min.js')
->appendFile($this->basePath() . '/<path to your js-cookie>/js-cookie.js')
->appendFile($this->basePath() . '/assets/js/mattermostchat.js');
mattermostmessenger.local.php.dist
html
<div class="chat-container">
echo $this->mattermost();