i have a question, what's the logic behind creating command and creating a job with that command. you can directly write the requirements in the command and both command and job runs in background and you can schedule the command directly.
Hi, my name is Bob. I've been a software developer for many years. For me, programming leads to that wonderful state of flow, where you are completely and happily immersed in the thing u are doing.
i have a question, what's the logic behind creating command and creating a job with that command. you can directly write the requirements in the command and both command and job runs in background and you can schedule the command directly.
can you please provide any good logic over this.
You're right, you can put your logic in the command class without creating a job. That makes a lot of sense to me.
The Laravel documentation has this suggestion:
"It is good practice to keep your console commands light and let them defer to application services to accomplish their tasks."
I based my approach on this.
ohhk. I personally prefer running commands as independent unit. no dependency on queue n all.