Skip to content

Commit

Permalink
fix config cache
Browse files Browse the repository at this point in the history
  • Loading branch information
summerblue committed May 1, 2020
1 parent c82715c commit 571da49
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Frozennode/Administrator/AdministratorServiceProvider.php
Expand Up @@ -122,10 +122,15 @@ public function setLocale()
public function fixConfigAndRouteCacheIfNeeded()
{
// Hack for laravel config cache

$file = config_path('administrator.php');
if (file_exists($file)) {
$this->mergeConfigFrom($file, 'administrator');

if ($this->app->configurationIsCached()) {
$this->app['config']->set('administrator', array_merge(
require $file, $this->app['config']->get('administrator', [])
));
}

if (app()->runningInConsole()) {
$configs = \Config::get('administrator');
$configs = $this->filter_recursive($configs);
Expand Down

0 comments on commit 571da49

Please sign in to comment.