files = $files; } /** * Execute the console command. * * @return void */ public function handle() { $this->call('config:clear'); $config = $this->getFreshConfiguration(); $this->files->put( $this->laravel->getCachedConfigPath(), 'info('Configuration cached successfully!'); } /** * Boot a fresh copy of the application configuration. * * @return array */ protected function getFreshConfiguration() { $app = require $this->laravel->bootstrapPath().'/app.php'; $app->make(ConsoleKernelContract::class)->bootstrap(); return $app['config']->all(); } }