PHP code example of ajaxray / laravel-server-sync

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

    

ajaxray / laravel-server-sync example snippets

bash
php artisan vendor:publish --provider="Ajaxray\ServerSync\ServerSyncServiceProvider"
bash
php artisan sync:pull
bash
# Skip database sync entirely
php artisan sync:pull --skip-db

# Exclude specific tables
php artisan sync:pull --exclude-tables=logs,cache,sessions

# Only sync specific tables
php artisan sync:pull --only-tables=users,products,orders
bash
# Skip file sync entirely
php artisan sync:pull --skip-files

# Sync files with deletion (removes local files that don't exist in production)
php artisan sync:pull --delete