You are on page 1of 215

EVENT SOURCING

IN L ARAVEL
A Beyond CRUD strategy
By Brent Roose

EVENT-SOURCING-L ARAVEL .COM


Here we dispatch the event only to handle side effects of
the cart being checked out (updating inventory and sending an invoice
PDF to the customer). What if we turned things around and “updating the
cart’s status” is also considered part of those “side effects”?

Our action would look like this:

The handler dedicated to updating the cart would look like this:

3. Events 34

You might also like