We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5879a2c + fd25edb commit d5eb087Copy full SHA for d5eb087
app/Foundation/Providers/ConfigServiceProvider.php
@@ -35,9 +35,10 @@ class ConfigServiceProvider extends ServiceProvider
35
public function boot()
36
{
37
$env = $this->app->environment();
38
+ $cli = $this->app->runningInConsole();
39
$repo = $this->app->make(Repository::class);
40
$cache = $this->app->make(Cache::class);
- $loaded = $cache->load($env);
41
+ $loaded = $cli ? false : $cache->load($env);
42
43
$this->app->terminating(function () use ($repo, $cache) {
44
if ($repo->stale()) {
@@ -46,7 +47,7 @@ public function boot()
46
47
});
48
49
try {
- if ($loaded === false) {
50
+ if ($cli === false && $loaded === false) {
51
$loaded = $repo->all();
52
$cache->store($env, $loaded);
53
}
0 commit comments