PHP code example of ldavidsp / laravel-sync
1. Go to this page and download the library: Download ldavidsp/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/ */
ldavidsp / laravel-sync example snippets
/*
|--------------------------------------------------------------------------
| Sync tables
|--------------------------------------------------------------------------
*/
'sync_tables' => [
'table_name_1',
],
/**
* Sync local database with production.
*/
if (App::environment('local')) {
$schedule->command('sync:prod')->everyTenMinutes();
}
bash
php artisan vendor:publish --tag=sync-config
bash
php artisan sync:prod