Skip to content

Commit 530e209

Browse files
committed
add no auth scaffolding option
1 parent ba65cc5 commit 530e209

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/NewCommand.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ protected function configure()
5757
->addOption('livewire', null, InputOption::VALUE_NONE, 'Install the Livewire Starter Kit')
5858
->addOption('livewire-class-components', null, InputOption::VALUE_NONE, 'Generate stand-alone Livewire class components')
5959
->addOption('workos', null, InputOption::VALUE_NONE, 'Use WorkOS for authentication')
60+
->addOption('no-authentication', null, InputOption::VALUE_NONE, 'Do not generate authentication scaffolding')
6061
->addOption('pest', null, InputOption::VALUE_NONE, 'Install the Pest testing framework')
6162
->addOption('phpunit', null, InputOption::VALUE_NONE, 'Install the PHPUnit testing framework')
6263
->addOption('npm', null, InputOption::VALUE_NONE, 'Install and build NPM dependencies')
@@ -136,16 +137,20 @@ protected function interact(InputInterface $input, OutputInterface $output)
136137
options: [
137138
'laravel' => "Laravel's built-in authentication",
138139
'workos' => 'WorkOS (Requires WorkOS account)',
140+
'none' => 'No authentication scaffolding',
139141
],
140142
default: 'laravel',
141143
)) {
142144
'laravel' => $input->setOption('workos', false),
143145
'workos' => $input->setOption('workos', true),
146+
'none' => $input->setOption('no-authentication', true),
144147
default => null,
145148
};
146149
}
147150

148-
if ($input->getOption('livewire') && ! $input->getOption('workos')) {
151+
if ($input->getOption('livewire') &&
152+
! $input->getOption('workos') &&
153+
! $input->getOption('no-authentication')) {
149154
$input->setOption('livewire-class-components', ! confirm(
150155
label: 'Would you like to use Laravel Volt?',
151156
default: true,
@@ -764,6 +769,15 @@ protected function generateAppUrl($name, $directory)
764769
*/
765770
protected function getStarterKit(InputInterface $input): ?string
766771
{
772+
if ($input->getOption('no-authentication')) {
773+
return match (true) {
774+
$input->getOption('react') => 'laravel/blank-react-starter-kit',
775+
$input->getOption('vue') => 'laravel/blank-vue-starter-kit',
776+
$input->getOption('livewire') => 'laravel/blank-livewire-starter-kit',
777+
default => $input->getOption('using'),
778+
};
779+
}
780+
767781
return match (true) {
768782
$input->getOption('react') => 'laravel/react-starter-kit',
769783
$input->getOption('vue') => 'laravel/vue-starter-kit',

0 commit comments

Comments
 (0)