PHP code example of pm-connect / db-diff-utils

1. Go to this page and download the library: Download pm-connect/db-diff-utils 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/ */

    

pm-connect / db-diff-utils example snippets




use PMConnect\DBDiff\Utils\Diff;
use Illuminate\Database\MySqlConnection;

$config1 = [
    'driver' => 'mysql',
    'host' => '127.0.0.1',
    'port' => '3306,
    'database' => 'some_database',
    'collation' => 'utf8mb4_general_ci',
    'username' => 'username',
    'password' => 'password'
];

$config2 = [
    'driver' => 'mysql',
    'host' => '127.0.0.1',
    'port' => '3306,
    'database' => 'some_other_database',
    'collation' => 'utf8mb4_general_ci',
    'username' => 'username',
    'password' => 'password'
];

// Connect to the nce of your Output implementation to inject.
$output = new YourImplementationOfOutputContract;

// Create a diff instance with the 

>>> php artisan db:diff --default-collation=utf8mb4_general_ci