Deal with cases when we have no settings properly
This commit is contained in:
@@ -40,9 +40,11 @@ class ConfigServiceProvider extends ServiceProvider
|
||||
$cache = false;
|
||||
}
|
||||
|
||||
$this->app->terminating(function () use ($path) {
|
||||
$this->app->terminating(function () use ($cache, $path) {
|
||||
if ($this->app->setting->stale()) {
|
||||
$this->app->files->put($path, '<?php return '.var_export($this->app->setting->all(), true).';'.PHP_EOL);
|
||||
} elseif ($cache === false) {
|
||||
$this->app->files->put($path, '<?php return '.var_export([], true).';'.PHP_EOL);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user