4

on magento 2 when we create a console command, we can add arguments and/or option. But what is the difference between the two? In which cases should we use one or the other?

1 Answer 1

3

Options have a flag. Arguments have no flag.

bin/magento‌ do:something‌ --email="[email protected]"

do:something = Argument

--email = Option

(accept the anwser if solved your doubt)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.