Skip to content

rocketfirm/mattermost-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mattermost-driver

The Laravel Driver to interact with the Mattermost Web Service API.

Please read the api documentation for further information on using this application.

Installation


Composer

The best way to install mattermost-driver is to use Composer:

composer require rocketfirm/mattermost-driver

Read more about how to install and use Composer on your local machine here.

Laravel

After installation launch the command:

php artisan vendor:publish

to publish the configuration file. You'll find it at config/mattermost.php

Configuration


Edit the file config/mattermost.php as you prefer.

Usage


use \Rocketfirm\MattermostDriver\Facades\Mattermost;
 
// Retrieve the driver
$driver = Mattermost::server('default');

// Retrieve the User Model
$userModel = $driver->getUserEndpoint();

// Retrieve the User Model directly (on the default server)
$userModel = Mattermost::server()->getUserEndpoint();

Via dependency injection

use \Rocketfirm\MattermostDriver\Contracts\DriverContract;

// Retrieve the driver
$mattermost = app()->make(DriverContract::class);

// Retrieve the User Model
$userModel = $driver->getUserEndpoint();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages