PHP code example of escolalms / mattermost

1. Go to this page and download the library: Download escolalms/mattermost 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/ */

    

escolalms / mattermost example snippets

 
$this->actingAs($this->user, 'api')->json(
    'POST',
    '/api/admin/config',
    [
        'config' => [
            [
                'key' => 'mattermost.package_status',
                'value' => PackageStatusEnum::ENABLED,
            ],
            [
                'key' => 'mattermost.servers.default.host',
                'value' => 'localhost',
            ],
            [
                'key' => 'mattermost.servers.default.login',
                'value' => 'login',
            ],
            [
                'key' => 'mattermost.servers.default.password',
                'value' => 'password',
            ],
        ]
    ]
);