Copy example env over for user

This commit is contained in:
Lance Pioch 2024-05-07 21:52:51 -04:00
parent fe3bf88ea4
commit a050fbd2d3

View File

@ -61,7 +61,6 @@ class AppSettingsCommand extends Command
*/ */
public function handle(): int public function handle(): int
{ {
if (empty(config('hashids.salt')) || $this->option('new-salt')) { if (empty(config('hashids.salt')) || $this->option('new-salt')) {
$this->variables['HASHIDS_SALT'] = str_random(20); $this->variables['HASHIDS_SALT'] = str_random(20);
} }
@ -124,6 +123,12 @@ class AppSettingsCommand extends Command
} }
$this->checkForRedis(); $this->checkForRedis();
$path = base_path('.env');
if (!file_exists($path)) {
copy($path . '.example', $path);
}
$this->writeToEnvironment($this->variables); $this->writeToEnvironment($this->variables);
$this->info($this->console->output()); $this->info($this->console->output());