PHP code example of divineomega / uxdm-eloquent

1. Go to this page and download the library: Download divineomega/uxdm-eloquent 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/ */

    

divineomega / uxdm-eloquent example snippets


$eloquentSource = new EloquentSource(\App\User::class);

$eloquentSource = new EloquentSource(\App\User::class, function($query) {
    $query->where('id', 1);
});

$migrator = new Migrator;
$migrator->setSource($eloquentSource);

$eloquentDestination = new EloquentDestination(\App\User::class);

$migrator = new Migrator;
$migrator->setDestination($eloquentDestination);

$migrator = new Migrator;
$migrator->addDestination($eloquentDestination, ['field1', 'field2']);
$migrator->addDestination($otherDestination, ['field3', 'field2']);