Answer the question
In order to leave comments, you need to log in
Is it possible to create two (or more) models for the same table in Yii2?
I need to process the same table in different ways depending on the circumstances. For example, if there is already a model that is already widely used in the system, but has a feature - the use of sessions in behavior. However, I need to process the same table and fill it with data in cron, which does not allow the "feature" of this model.
Question: Can I make an additional model to handle this particular case (without using sessions)? If not, how can I bypass these sessions when working in a console application?
Answer the question
In order to leave comments, you need to log in
https://github.com/yiisoft/yii2/blob/4359f4665b1b1...
Here is an example, as done in the framework.
But this is not very correct from the word at all. If you don't understand why, then you can do it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question