1. Go to this page and download the library: Download marceli-to/statamic-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/ */
marceli-to / statamic-sync example snippets
// config/statamic-sync.php
return [
// Shared secret for authentication ( (local side only)
'remote' => env('STATAMIC_SYNC_REMOTE', ''),
// Directories to sync (relative to project root)
'paths' => [
'content' => 'content',
'assets' => 'public/assets',
],
// URL prefix for the sync endpoint
'route_prefix' => '_sync',
// Optional IP whitelist (empty = allow all, token still