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:
parent
cfaa6463ee
commit
3306b8e6de
3 changed files with 27 additions and 8 deletions
|
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue