Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change current command.stub to use new 'signature' of Laravel 5 #258

Open
wants to merge 1 commit into
base: 2.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Modify stub of command generator to use new 'signature' for Laravel 5…
… instead of old 'name + arguments + options'
trepatudo committed May 18, 2016
commit 2b8eaacb45c68a58c2bc70f2b535800392c3bc9a
31 changes: 4 additions & 27 deletions Commands/stubs/command.stub
Original file line number Diff line number Diff line change
@@ -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],
];
}

}