Skip to content

Commit c3b3c66

Browse files
committed
prompt for config publish
1 parent cd87c89 commit c3b3c66

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/NewCommand.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int
174174
}
175175

176176
if (($process = $this->runCommands($commands, $input, $output))->isSuccessful()) {
177+
if ($this->usingLaravel11OrNewer($directory)) {
178+
if (confirm(label: 'Would you like to publish Laravel\'s configuration files?', default: false)) {
179+
$this->runCommands([
180+
$this->phpBinary().' artisan config:publish --all',
181+
], $input, $output, workingPath: $directory);
182+
183+
@unlink($directory.'/config/.gitkeep');
184+
}
185+
}
186+
177187
if ($name !== '.') {
178188
$this->replaceInFile(
179189
'APP_URL=http://localhost',

0 commit comments

Comments
 (0)