PHP code example of marceli-to / laravel-sync

1. Go to this page and download the library: Download marceli-to/laravel-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 / laravel-sync example snippets


// config/laravel-sync.php

return [
    // Shared secret for authentication ( (local side only)
    'remote' => env('LARAVEL_SYNC_REMOTE', ''),

    // Database connection to dump/import (null = default). MySQL only.
    'connection' => env('LARAVEL_SYNC_CONNECTION'),

    // Asset directories to sync (relative to project root).
    // Add entries to limit the sync to specific sub-folders.
    'paths' => [
        'assets' => 'storage/app/public',
    ],

    // URL prefix for the sync endpoints
    'route_prefix' => '_sync',

    // Optional IP whitelist (empty = allow all, token still 
bash
php artisan vendor:publish --tag=laravel-sync-config
bash
php artisan sync:pull
bash
php artisan sync:pull --only=database
bash
php artisan sync:pull --only=assets
bash
php artisan sync:pull --dry-run
bash
php artisan sync:pull --full
bash
php artisan sync:pull --force