Skip to content

Commit edc2f49

Browse files
authored
Add the Livewire stack option to Breeze (#285)
1 parent c0febf7 commit edc2f49

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/NewCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ protected function promptForBreezeOptions(InputInterface $input)
393393
label: 'Which Breeze stack would you like to install?',
394394
options: [
395395
'blade' => 'Blade',
396+
'livewire' => 'Livewire with Alpine',
396397
'react' => 'React with Inertia',
397398
'vue' => 'Vue with Inertia',
398399
'api' => 'API only',
@@ -414,7 +415,7 @@ protected function promptForBreezeOptions(InputInterface $input)
414415
$input->getOption('typescript') ? 'typescript' : null,
415416
]),
416417
))->each(fn ($option) => $input->setOption($option, true));
417-
} elseif ($input->getOption('stack') === 'blade' && ! $input->getOption('dark')) {
418+
} elseif (in_array($input->getOption('stack'), ['blade', 'livewire']) && ! $input->getOption('dark')) {
418419
$input->setOption('dark', confirm(
419420
label: 'Would you like dark mode support?',
420421
default: false,
@@ -464,7 +465,7 @@ protected function promptForJetstreamOptions(InputInterface $input)
464465
protected function validateStackOption(InputInterface $input)
465466
{
466467
if ($input->getOption('breeze')) {
467-
if (! in_array($input->getOption('stack'), $stacks = ['blade', 'react', 'vue', 'api'])) {
468+
if (! in_array($input->getOption('stack'), $stacks = ['blade', 'livewire', 'react', 'vue', 'api'])) {
468469
throw new \InvalidArgumentException("Invalid Breeze stack [{$input->getOption('stack')}]. Valid options are: ".implode(', ', $stacks).'.');
469470
}
470471

0 commit comments

Comments
 (0)