Support the ongoing development of →
Requests IOC Architecture
Last updated 2 years ago.

Anyone? bump


The controller's entire role in the MVC pattern is to accept input and return responses.

So instead of returning a model directly from controller, you should write a "working" class into which you'll inject whatever you need: the model/any other class useful for you for the required transformation and use that into the controller.


Sign in to participate in this thread!


Your banner here too?

oniice oniice Joined 17 Jan 2016


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.