1. Go to this page and download the library: Download umbrellio/php-table-sync 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/ */
umbrellio / php-table-sync example snippets
...
User extends Model implements SyncableModel
{
use TableSyncable;
...
public function routingKey(): string
{
return 'users';
}
public function getTableSyncableAttributes(): array
{
return [
'id' => $this->external_id,
'login' => $this->name,
'email' => $this->email,
];
}
...