PHP code example of ledgehq / ledge-craft

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

    

ledgehq / ledge-craft example snippets


// config/ledge.php
return [
    'diskDegradedAt' => 85,
    'diskUnhealthyAt' => 95,
    'diskMinFreeBytes' => 10 * 1024 ** 3,
    'updateAvailableStatus' => 'degraded',
    'enabledChecks' => ['freeform' => false],
];

// config/ledge.php
return [
    'secretKey' => '$LEDGE_SECRET_KEY',
    'acquireEnabled' => true, // or LEDGE_ACQUIRE_ENABLED=true
];