PHP code example of sammy-boy / realtime-core

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

    

sammy-boy / realtime-core example snippets


use SammyBoy\Realtime\WebSocketBroadcaster;

$broadcaster->broadcast(
    eventName: 'tenant.registration.completed',
    data: [
        'auth_user_id' => 12,
        'status' => 'success',
    ],
    channel: 'job.1234'
);