@pieterxjan This looks the right flow. Just make sure, you not queuing Handler and Notification and Mailable. Then it will be 3 queues. Queuing Handler should be enough.
Am I using the correct workflow?
Hi guys,
I'm developing some sort of platform in which someone can post a question, other users can be an "expert" on that topic and will be able to answer that question.
At this point, I'm at the part where all experts have given their answers so the question can be marked as complete and the original person that posed the question can be notified. I have a certain workflow but it feels like a bit of overkill. So I'm hoping you guys can give feedback on wether I'm using the correct workflow or how you would do it.
How I do it now:
- In the Controller, I call the event AnswerGiven
- In the RouteServiceProvider, I have a listener CheckIfAllAnswersAreGiven listening for AnswerGiven
- That listener checks wether all answers are given. If so, I call the Notification QuestionAnswered.
- In that notification, I use the Mailable AllUsersAnswered which finally sends the mail.
In short: Controller > Event > Listener > Notification > Mailable
To be clear: everything works as expected. I'm just unsure about class naming and/or correct usage of workflow.
Regards PJ
Please or to participate in this conversation.