What is the best way to use multiple repository in Laravel controller


For Example,I have 3 repo Products,Accounts,Users. I have injected products repo in productscontroller.I need user information on that controller.but user information method is in user repo. How I can reuse that method. Actually I don’t want to write duplicate code.Please need suggestions from experts. Thank you.

Source: Laravel

Leave a Reply