From dd35555a91026e7f47b52f2e175b773c9116b630 Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Mon, 21 Sep 2020 18:13:43 +0530 Subject: [PATCH] Config Cache Added --- packages/Webkul/Core/src/Console/Commands/Install.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Core/src/Console/Commands/Install.php b/packages/Webkul/Core/src/Console/Commands/Install.php index 287173635..eb4fdea6e 100644 --- a/packages/Webkul/Core/src/Console/Commands/Install.php +++ b/packages/Webkul/Core/src/Console/Commands/Install.php @@ -64,6 +64,11 @@ class Install extends Command $result = shell_exec('composer dump-autoload'); $this->info($result); + // cached new changes + $this->warn('Step: Caching new changes...'); + $cached = shell_exec('php artisan config:cache'); + $this->info($cached); + $this->info('-----------------------------'); $this->info('Now, run `php artisan serve` to start using Bagisto'); $this->info('Cheers!'); @@ -99,7 +104,7 @@ class Install extends Command $locale = $this->choice('Please select the default locale or press enter to continue', ['ar', 'en', 'fa', 'nl', 'pt_BR'], 1); $this->envUpdate('APP_LOCALE=', $locale); - + $TimeZones = timezone_identifiers_list(); $timezone = $this->anticipate('Please enter the default timezone', $TimeZones, date_default_timezone_get()); $this->envUpdate('APP_TIMEZONE=', $timezone); @@ -136,7 +141,7 @@ class Install extends Command $path = base_path() . '/.env'; $data = file($path); $keyValueData = $changedData = []; - + if ($data) { foreach ($data as $line) { $line = preg_replace('/\s+/', '', $line); @@ -148,7 +153,7 @@ class Install extends Command if (strpos($key, $rowValues[0]) !== false) { $keyValueData[$rowValues[0]] = $value; } - } + } } }