PHP code example of minkbear / azure-key-vault

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

    

minkbear / 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');

$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