A
A
alxsmrn2016-06-23 13:58:47
Yii
alxsmrn, 2016-06-23 13:58:47

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

1 answer(s)
K
Kirill Arutyunov, 2016-06-23
@arutyunov

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 question

Ask a Question

731 491 924 answers to any question