PHP code example of utopia-php / migration
1. Go to this page and download the library: Download utopia-php/migration 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/ */
utopia-php / migration example snippets
use Utopia\Migration\Transfer;
use Utopia\Migration\Sources\NHost;
use Utopia\Migration\Destinations\Appwrite;
Initialize your Destination
$destination = new Appwrite('project-id', 'https://cloud.appwrite.io/v1', 'api-key');
// Initialize Transfer
$migration = new Transfer($source, $destination);
// Transfer the resource groups you want
$transfer->run(
[
Transfer::GROUP_AUTH
], function ($status) {
echo $status['message'] . PHP_EOL;
}
);
bash
composer