Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit 73d38e7

Browse files
committed
foreach for speed
1 parent 0670473 commit 73d38e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LaravelDbUriServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ public function register()
5656
if(!$components = parse_url($url)) throw new \Exception('Database URL may be malformed.');
5757

5858
// Set each config
59-
array_walk($this->config_map, function($config_key, $component_key) use($components, $driver){
59+
foreach($this->config_map as $component_key => $config_key) {
6060
config(["database.connections.{$driver}.{$config_key}" => $this->clean($component_key, $components[$component_key])]);
61-
});
61+
}
6262
}
6363
}
6464

0 commit comments

Comments
 (0)