Answer the question
In order to leave comments, you need to log in
How to call the action of another controller?
I need to do some manipulations with the data, I don’t want to edit the database with my hands, I decided to simulate an action call from another controller. It doesn't work so far. How to do it?
The required action is rendered as a separate action inherited from yii\base\action
Answer the question
In order to leave comments, you need to log in
Why call another controller when manipulating data?
There are models where the data is all described, call the model (even if it is in another module)
and work with it already.
In OOP, for the case when the same functions are needed in two different classes, there is inheritance.
Essentially, you want to do a quick redirect and back. This is of course not correct.
But since you really want to, do curl on your own domain :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question