I'm developing a system in Laravel (php).
I read in several articles that "we should" use the "EVENTS" to perform actions after the main has been done, eg
- > no controller:
// I register a user
// call event (store)
- > in the event store, has a listener for each item, eg:
// register in the specified user group.
// send e-mail talking about registration.
// ...
Is the idea really this?
I thought it could be done as follows:
- > no controller
// call event store
- > no event store:
// register user
// register in the specified user group.
// send e-mail talking about registration.
// ..