Hi !
I'm trying to improve my webiste architecture and read a lot about Repo and Presenters. Right now my models use a lot of accessors to prepare some data, and I saw that it's not such a good practice to let my models do all this jobs and that a better place would be a view presenter. Ok why not. But after more digging I see other using repositories to abstract the model layer and they do this kind of jobs in the repo and not in a view presenter... when should I do what ?
Also while trying to tidy up my structure I found myself having a difficult choise. In my "app/myproject" should I have my folder by "modules", like one for my images manipulation interface called "Images", one for my users repo called "Users" etc... or having my folder by "types", like "Repo", "Interfaces", "Service", "Presenters"....
Thanks for your tips !
I'm doing it like this (I don't know it is the right way)
app / trinity(app name) / Users / User, UserPresenter, UserRepository
So your UserPresenter work on the Repo or is it called by the Controller ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community