PHP code example of insites-consulting / azure-key-vault

1. Go to this page and download the library: Download insites-consulting/azure-key-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/ */

    

insites-consulting / azure-key-vault example snippets


$secret = Vault::secret('apikey');

$other_secret = Vault::secret('otherkey', 'default-value');

$secret = secret('apikey');
$other_secret = secret('otherkey', 'default-key');

Vault::setSecret('apikey', 'longsecretvalue');

$secret = secret('apikey');
Vault::setVault('other-vault');
$other_secret = secret('apikey');

$other_secret = secret('apikey');
Vault::setVault();
$secret = secret('apikey');

php artisan vendor:publish --provider='InsitesConsulting\AzureKeyVault\ServiceProvider'