dimanche 18 septembre 2016

Laravel 5 - Share repositories between controller

I encounter an organizational problem in Laravel 5, would love some help on it !

I have multiple controllers for multiple data type (let's say, articles, contest, posts... for example). All those controllers share different functionalities so i decided to make a parent class. Each of those controllers are dependent on one repository each which is injected through constructor. But i also have secondary repositories used by all those controllers (let's say category, status, for example). How am I suppose to deal with them in the parent class ?

Thanks in advance !



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire