From 2b8eaacb45c68a58c2bc70f2b535800392c3bc9a Mon Sep 17 00:00:00 2001 From: Marco Silva Date: Wed, 18 May 2016 13:40:58 +0100 Subject: [PATCH] Modify stub of command generator to use new 'signature' for Laravel 5 instead of old 'name + arguments + options' --- Commands/stubs/command.stub | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/Commands/stubs/command.stub b/Commands/stubs/command.stub index 73d4b60..8036b2b 100644 --- a/Commands/stubs/command.stub +++ b/Commands/stubs/command.stub @@ -7,11 +7,12 @@ use Symfony\Component\Console\Input\InputArgument; class $CLASS$ extends Command { /** - * The console command name. + * The console command signature. + * * * @var string */ - protected $name = '$COMMAND_NAME$'; + protected $signature = '$COMMAND_NAME$ {requiredArg} {optionalArg?} {optionalArgWithVal=default} {--option}'; /** * The console command description. @@ -35,33 +36,9 @@ class $CLASS$ extends Command { * * @return mixed */ - public function fire() + public function handle() { // } - /** - * Get the console command arguments. - * - * @return array - */ - protected function getArguments() - { - return [ - ['example', InputArgument::REQUIRED, 'An example argument.'], - ]; - } - - /** - * Get the console command options. - * - * @return array - */ - protected function getOptions() - { - return [ - ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], - ]; - } - }