File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,9 @@ class LaravelAwsSecretsManager
1616 protected $ debug ;
1717 protected $ enabledEnvironments ;
1818 protected $ listTag ;
19- protected $ variables ;
2019
2120 public function __construct ()
2221 {
23- $ this ->variables = config ('aws-secrets-manager.variables ' );
24-
2522 $ this ->listTagName = config ('aws-secrets-manager.tag-name ' );
2623 $ this ->listTagValue = config ('aws-secrets-manager.tag-value ' );
2724
@@ -47,12 +44,8 @@ public function loadSecrets()
4744
4845 //Only run this if the evironment is enabled in the config
4946 if (in_array (config ('app.env ' ), $ this ->enabledEnvironments )) {
50- if ($ this ->cache ) {
51- if (! $ this ->checkCache ()) {
52- //Cache has expired need to refresh the cache from Datastore
53- $ this ->getVariables ();
54- }
55- } else {
47+ if (! $ this ->checkCache ()) {
48+ //Cache has expired need to refresh the cache from Datastore
5649 $ this ->getVariables ();
5750 }
5851
@@ -68,7 +61,7 @@ public function loadSecrets()
6861
6962 protected function checkCache ()
7063 {
71- foreach ($ this ->variables as $ variable ) {
64+ foreach ($ this ->configVariables as $ variable => $ configPath ) {
7265 $ val = Cache::store ($ this ->cacheStore )->get ($ variable );
7366 if (! is_null ($ val )) {
7467 putenv ("$ variable= $ val " );
You can’t perform that action at this time.
0 commit comments