Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
It is forbidden.
The model knows nothing about the calling interface.
There is a very simple empirical test to see if any code belongs to a model or a controller: implement the same functionality via a command line utility.
In this case, it will immediately become clear that the redirect on the command line - and therefore in the model - is nonsense. And any manipulations with the HTTP protocol must be performed in the only component that is responsible for working with the HTTP controller.
it is better to get the execution status from the model, and redirect it already in the controller
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question