PHP code example of philip / instagres

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

    

philip / instagres example snippets




hilip\Instagres\Client;

$database = Client::createClaimableDatabase();

echo "Pooled (app): {$database['connection_string']}\n";
echo "Direct (migrations): {$database['direct_connection_string']}\n";
echo "Id: {$database['id']}\n";
echo "Claim: {$database['claim_url']}\n";
echo "Expires: {$database['expires_at']}\n";
bash
composer install
php examples/create-database.php