1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/improve-the-dx-of-your-commands-by-making-arguments-optional-and-prompting-the-user-when-theyre-empty.md
2022-04-17 20:03:34 +02:00

658 B
Raw Permalink Blame History

title tweet_id thread_slug author_username images created_at slug
Improve the DX of your commands by making arguments optional and prompting the user when they're empty 1515057387027140609 weekly-thread-2022-15 mmartin_joo
https://pbs.twimg.com/media/FQAcwOkWUAESOwS.jpg
2022-04-15T20:00:04+00:00 improve-the-dx-of-your-commands-by-making-arguments-optional-and-prompting-the-user-when-theyre-empty

💡 Just a quick tip: define every argument of commands as optional and ask for input if they are missing.

This way, you dont need to think about the arguments when running a command.

Just run it, and it will ask everything: