PHP code example of appiersign / realtime-model

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

    

appiersign / realtime-model example snippets


    php artisan realtime:sync User

public function toRealtimeData(): array
{
    return [
        'externalId' => $this->external_id,
        'fullName' => $this->full_name,
        'phone' => $this->phone,
        'username' => $this->username
    ];
}