PHP code example of timetorock / laravel-rocket-chat

1. Go to this page and download the library: Download timetorock/laravel-rocket-chat 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/ */

    

timetorock / laravel-rocket-chat example snippets


\Timetorock\LaravelRocketChat\Provider\LaravelRocketChatServiceProvider::class



use Timetorock\LaravelRocketChat\Client\UserClient;
use Timetorock\LaravelRocketChat\Models\User;

$userClient = new UserClient();
$userObject = $userClient->create(new User([
        'email'=> '[email protected]',
        'name' => 'test',
        'password' => '12345',
        'username' => 'test',
]));

$userID = $userObject->getId();
$user = $userObject->getAuthToken();


php artisan vendor:publish --tag=config