PHP code example of arsentiyz / mattermost-driver
1. Go to this page and download the library: Download arsentiyz/mattermost-driver library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
arsentiyz / mattermost-driver example snippets
use \Arsentiyz\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 \Arsentiyz\MattermostDriver\Contracts\DriverContract;
// Retrieve the driver
$mattermost = app()->make(DriverContract::class);
// Retrieve the User Model
$userModel = $driver->getUserEndpoint();
shell
php artisan vendor:publish