From 2c9ace8eac1924675a4fc2b53bfa433907529cbc Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 9 Oct 2023 18:26:50 +0100 Subject: [PATCH] Adjusts new command with new Breeze options --- src/NewCommand.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NewCommand.php b/src/NewCommand.php index aa6dc586..e2ab3351 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -391,8 +391,9 @@ protected function promptForBreezeOptions(InputInterface $input) $input->setOption('stack', select( label: 'Which Breeze stack would you like to install?', options: [ - 'blade' => 'Blade', - 'livewire' => 'Livewire with Alpine', + 'blade' => 'Blade with Alpine', + 'livewire' => 'Livewire (Volt Class API) with Alpine', + 'livewire-functional' => 'Livewire (Volt Functional API) with Alpine', 'react' => 'React with Inertia', 'vue' => 'Vue with Inertia', 'api' => 'API only', @@ -414,7 +415,7 @@ protected function promptForBreezeOptions(InputInterface $input) $input->getOption('typescript') ? 'typescript' : null, ]), ))->each(fn ($option) => $input->setOption($option, true)); - } elseif (in_array($input->getOption('stack'), ['blade', 'livewire']) && ! $input->getOption('dark')) { + } elseif (in_array($input->getOption('stack'), ['blade', 'livewire', 'livewire-functional']) && ! $input->getOption('dark')) { $input->setOption('dark', confirm( label: 'Would you like dark mode support?', default: false, @@ -464,7 +465,7 @@ protected function promptForJetstreamOptions(InputInterface $input) protected function validateStackOption(InputInterface $input) { if ($input->getOption('breeze')) { - if (! in_array($input->getOption('stack'), $stacks = ['blade', 'livewire', 'react', 'vue', 'api'])) { + if (! in_array($input->getOption('stack'), $stacks = ['blade', 'livewire', 'livewire-functional', 'react', 'vue', 'api'])) { throw new \InvalidArgumentException("Invalid Breeze stack [{$input->getOption('stack')}]. Valid options are: ".implode(', ', $stacks).'.'); }