Skip to content

Commit

Permalink
add auth option
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 18, 2019
1 parent e5ae718 commit f5ebbff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion laravel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (file_exists(__DIR__.'/../../autoload.php')) {
require __DIR__.'/vendor/autoload.php';
}

$app = new Symfony\Component\Console\Application('Laravel Installer', '2.2.0');
$app = new Symfony\Component\Console\Application('Laravel Installer', '2.2.2');
$app->add(new Laravel\Installer\Console\NewCommand);

$app->run();
8 changes: 8 additions & 0 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ protected function configure()
->setDescription('Create a new Laravel application')
->addArgument('name', InputArgument::OPTIONAL)
->addOption('dev', null, InputOption::VALUE_NONE, 'Installs the latest "development" release')
->addOption('auth', null, InputOption::VALUE_NONE, 'Installs the Laravel authentication scaffolding')
->addOption('force', 'f', InputOption::VALUE_NONE, 'Forces install even if the directory already exists');
}

Expand Down Expand Up @@ -131,6 +132,9 @@ protected function download($zipFile, $version = 'master')
case 'develop':
$filename = 'latest-develop.zip';
break;
case 'auth':
$filename = 'latest-auth.zip';
break;
case 'master':
$filename = 'latest.zip';
break;
Expand Down Expand Up @@ -215,6 +219,10 @@ protected function getVersion(InputInterface $input)
return 'develop';
}

if ($input->getOption('auth')) {
return 'auth';
}

return 'master';
}

Expand Down

0 comments on commit f5ebbff

Please sign in to comment.