Support the ongoing development of →
Last updated 3 months ago.

Your right in saying that controllers shouldn't really talk to each other. It depends on your project, but it makes them tightly coupled. IE, one relies on the other a little too much.

I would approach this by firing an event. Other services can then list for that event and react as you want it to. This way, other services could fire the same event and and get responded to.

Take a look at

Hope that helps.


I guess that since you're building a shop, you don't have all of your business logic directly in the controller but references another class containing the actual logic. As T2theC said, you could fire an event or listen for a model event, and then perform you notification.

Maybe you can get rid of some of the code in the MessagerController and make it even more clean??

Last updated 6 years ago.

Sign in to participate in this thread!


Your banner here too?

OlegEF OlegEF olegef Joined 8 Oct 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 - All rights reserved.