From 7e97a1de6194e7c5b1a7ed26f3ffc9f84893bd92 Mon Sep 17 00:00:00 2001 From: Prashant R <146315325+bigship-prashant@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:34:17 +0530 Subject: [PATCH] 5.x: Added default value on selection question while creating new application (#300) --- src/NewCommand.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NewCommand.php b/src/NewCommand.php index e5225834..265305a0 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -101,6 +101,7 @@ protected function interact(InputInterface $input, OutputInterface $output) 'breeze' => 'Laravel Breeze', 'jetstream' => 'Laravel Jetstream', ], + default: 'none', )) { 'breeze' => $input->setOption('breeze', true), 'jetstream' => $input->setOption('jet', true), @@ -118,6 +119,7 @@ protected function interact(InputInterface $input, OutputInterface $output) $input->setOption('pest', select( label: 'Which testing framework do you prefer?', options: ['PHPUnit', 'Pest'], + default: 'PHPUnit', ) === 'Pest'); } @@ -422,7 +424,8 @@ protected function promptForBreezeOptions(InputInterface $input) 'react' => 'React with Inertia', 'vue' => 'Vue with Inertia', 'api' => 'API only', - ] + ], + default: 'blade', )); } @@ -462,7 +465,8 @@ protected function promptForJetstreamOptions(InputInterface $input) options: [ 'livewire' => 'Livewire', 'inertia' => 'Vue with Inertia', - ] + ], + default: 'livewire', )); }