I tried to create a new command with multiple arguments as in the example on the Laravel page: https://laravel.com/docs/6.x/artisan#arguments
I ran into an issue when making the second argument optional.
When I make the second argument mandatory it is processed correctly.
Declaration:
protected $signature = 'email:send {user} {queue}';
Input:
php artisan email:send xyz asdf
Output:
Array
(
[command] => email:send
[user] => xyz
[queue] => asdf
)
But, if I make the second argument optional it is not being processed.
Declaration:
protected $signature = 'email:send {user} {--queue=}';
Input:
php artisan email:send xyz --queue=asdf
Output:
Array
(
[command] => email:send
[user] => xyz
)
The argument for --queue is missing in the array. It has not been processed.
Am I making a mistake, or is this a bug?