PHP code example of egensolve / realtime

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

    

egensolve / realtime example snippets


use Egensolve\Realtime\Contracts\Channel\AccountChannel;
use Egensolve\Realtime\Contracts\EnvelopeValidator;

$envelope = EnvelopeValidator::parse($rawEnvelopeJson);
$channel = AccountChannel::for('example', 'user', '42')->toString();

use Egensolve\Realtime\Contracts\Channel\CallChannel;
use Egensolve\Realtime\Contracts\Channel\ChannelParser;

$call = CallChannel::for('example', 'call_demo');
$name = $call->toString(); // private-v2.tenants.example.calls.call_demo
$parsed = ChannelParser::parse($name);