Example 8-8. Getting input from an Artisan command
public function handle() {
// All arguments, including the command name
$arguments = $this->arguments(); // Just the 'userId' argument
$userid = $this->argument('userId');
// All options, including some defaults like 'no-interaction' and 'env'
$options = $this->options();
// Just the 'sendEmail' option
$sendEmail = $this->option('sendEmail');
}