PHP code example of coxy121 / ringcentral-laravel

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

    

coxy121 / ringcentral-laravel example snippets


'providers' => [
    // Other service providers...

    RingCentral\Laravel\RingCentralServiceProvider::class,
],

use RingCentral\Laravel\Facade\RingCentral;

'aliases' => [
    ...
    'RingCentral' => RingCentral\Laravel\Facade\RingCentral::class,
],

RingCentral::sendMessage([
    'to'   => '13107960080',
    'text' => 'Using the facade to send a message.'
]);

$ringcentral = app('ringcentral');

$ringcentral->sendMessage([
    'to'   => '13107960080',
    'text' => 'Using the instance to send a message.'
]);

RingCentral::getExtensions();

$ringcentral = app('ringcentral');

$ringcentral->getExtensions();

RingCentral::getOperatorMessages();

$ringcentral = app('ringcentral');

$ringcentral->getOperatorMessages();

RingCentral::getOperatorMessages((new \DateTime())->modify('-1 hours'));

RingCentral::getMessagesForExtensionId(12345678);

$ringcentral = app('ringcentral');

$ringcentral->getMessagesForExtensionId(12345678);

RingCentral::getMessagesForExtensionId(12345678, (new \DateTime())->modify('-1 hours'));

RingCentral::getMessageAttachmentById(12345678, 910111213, 45678910);

$ringcentral = app('ringcentral');

$ringcentral->getMessageAttachmentById(12345678, 910111213, 45678910);
bash
php artisan vendor:publish