Hello :)
I'm trying to improve my architecture implementings Managers and I have some doubts about what I am doing.
Here is my architecture :
| app
| myProject
| Repositories
| Managers
| Models
| ...
| ...
| ...
First, I have two classes - Group and Message. Each one does have a manager implementing theirs CRUD actions.
I would like to post a first message when a group is created. So, I was planing to inject the MessageManager into my GroupManager.
Then, I could call this, just after creating the group.
$this->messageManager->create($inputs);
My question is : Is that solution really scalable ?
I mean, if one day I want to create a Topic AND a Message, I should inject the TopicManager too. And let's imagine, I have not only topics to add, but three different resources. It involves three more Managers in my GroupManager.
What do you think about this ? Do you resolve this problem another way ? :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community