1. Go to this page and download the library: Download technicalguru/vault 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/ */
technicalguru / vault example snippets
// Create configuration
$config = array(
'type' => 'hashicorp',
'config' => array(
'uri' => 'https://127.0.0.1:8200/v1',
'roleId' => '123456-12345-12345-123456',
'secretId' => 'abcdef-abcde-abcde-abcdef'
)
);
// Create the vault instance
try {
$vault = \TgVault\VaultFactory::create($config);
} catch (\TgVault\VaultException $e) {
// Vault could not be created
}