Answer the question
In order to leave comments, you need to log in
Where are models for the console controller stored in the yii2 base template?
Where in the base yii2 template to store models for the console controller? Perhaps you need to write down the path somewhere, or is it possible to make the model common for both the web and the console application in the base template?
Answer the question
In order to leave comments, you need to log in
You can use shared models, or make a console folder in the models folder and store console models there.
Don't forget about namespaces.
The framework does not restrict you in the structure, so do as you like, while not forgetting about the further maintenance of the code (your structure should not complicate the maintenance of the code).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question