Lest suppose we have couple of controller in Laravel. It is logic business layer that responsibilities about process activity.
One of them is ProductController, another one is OrderController.
Is is good practice to use selectivity ProductController's methods in OrderController?
If to lean on the SOLID principies, it is not. But what if I need to use one part of logic ProductController in OrderController?
Does it mean that I should use only through HTTP request? Or better to create singleton service, that will be available for both controllers?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire