If you find that particular classes in your code base have become incredibly complicated, it might be worth considering a general observer model. That way, when a notable event takes place in your system (
ThreadPublished, etc.), you only need to make an announcement to the rest of your application. Then, you may loosely register any number of handlers that will hook into this event, and respond as needed.
Published on Jan 27th, 2017.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.