1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 15:34:04 +00:00

Add support for arguments and options

This commit is contained in:
Samuel Štancl 2019-08-09 18:36:46 +02:00
parent cfaa6463ee
commit 3306b8e6de
3 changed files with 27 additions and 8 deletions

View file

@ -11,7 +11,7 @@ class ExampleCommand extends Command
*
* @var string
*/
protected $signature = 'foo {args*}';
protected $signature = 'foo {a} {--b=} {--c=}';
/**
* Execute the console command.
@ -28,7 +28,8 @@ class ExampleCommand extends Command
]);
$this->line("User's name is " . User::find(999)->name);
$this->line(implode(';', $this->argument('args')));
$this->line($this->argument('a'));
$this->line($this->option('c'));
}
}