Answer the question
In order to leave comments, you need to log in
Where is the best place to get data from API (MVC)?
Good day!
Can you please tell me where it is more correct to receive data from a third-party API, in a model or controller?
Answer the question
In order to leave comments, you need to log in
Neither there nor there. You do not output data on the site directly from the api, but save it somewhere before outputting it. Accordingly, the controller is not needed here. Or a console command, or some kind of handler / service, and already twitch your hands, if necessary, in the controller.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question