The Laravel Driver to interact with the Mattermost Web Service API.
Please read the api documentation for further information on using this application.
The best way to install mattermost-driver is to use Composer:
composer require rocketfirm/mattermost-driverRead more about how to install and use Composer on your local machine here.
After installation launch the command:
php artisan vendor:publishto publish the configuration file. You'll find it at config/mattermost.php
Edit the file config/mattermost.php as you prefer.
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();use \Rocketfirm\MattermostDriver\Contracts\DriverContract;
// Retrieve the driver
$mattermost = app()->make(DriverContract::class);
// Retrieve the User Model
$userModel = $driver->getUserEndpoint();