DEV Community

Discussion on: 4 Steps to Automate Repeated Tasks Using Laravel

Collapse
 
dog_smile_factory profile image
Dog Smile Factory

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.

Collapse
 
msamgan profile image
Mohammed Samgan Khan

ohhk. I personally prefer running commands as independent unit. no dependency on queue n all.