PHP code example of sunaoka / laravel-ssm-parameters-loader
1. Go to this page and download the library: Download sunaoka/laravel-ssm-parameters-loader 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/ */
sunaoka / laravel-ssm-parameters-loader example snippets
use Sunaoka\LaravelSsmParametersLoader\ParametersLoader;
echo env('MY_PARAMETER');
// still 'ssm:/path/to/value'
app()->make(ParametersLoader::class)->load();
echo env('MY_PARAMETER');
// my secret value
use Sunaoka\LaravelSsmParametersLoader\ParametersLoader;
$result = app()->make(ParametersLoader::class)->getParameters();
var_dump($result);
// array(1) {
// 'MY_PARAMETER' =>
// string(15) "my secret value"
// }