wardghb's avatar

Question About Commands and Domain Events Series

Hello All,

This series "Commands and Domain Events" has bee archived, is there a newer version or does this mean its no longer best practices in newer Laravel versions?

https://laracasts.com/series/commands-and-domain-events

Thank you

1 like
1 reply
martinbean's avatar
Level 80

@wardghb They’re design patterns. They’re not intrinsically linked to Laravel (or Laracasts) in any way, so you’re free to continue using commands, buses, and domain events if they’re appropriate solutions to the problems you have.

A series being archived on Laracasts doesn’t mean it’s “bad practice” and that you should cease using them immediately, or that commands and domain events are “bad”. It just means the course was recorded a little while ago, is complete, and won’t be receiving any further updates.

A little known fact is that Laravel’s queue component was actually borne out of a command bus introduced in Laravel 5.0. The command bus still exists in the framework and is available for use. I wrote a blog post about how to use it a while ago now, but is still valid today: https://martinbean.dev/blog/2019/03/21/command-bus-in-laravel/

2 likes

Please or to participate in this conversation.