php artisan make:command QuizStart --command=quiz:start
// /app/console/Kernel.php
protected $commands = [
// Commands\Inspire::class,
'App\Console\Commands\QuizStart'
];
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'quiz:start {user} {age} {--difficulty=} {--istest=}';
- Argument: quiz:start {argument}.
- Optional Argument (note the question mark next to the argument name): quiz:start {argument?}.
- Argument with default value: quiz:start {argument=defaultValue}.
- Boolean Option: quiz:start --myOption.
- Option with Value: quiz:start --myOption=.
- Option with Value and Default: quiz:start --myOption=12.