S
S
Snorway2016-07-07 17:45:40
Yii
Snorway, 2016-07-07 17:45:40

Where to put classes in Yii2?

Where is the correct place to put the class if it is neither a model nor a form? It also does not fit the definition of a helper (you need to create an object).

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Michael, 2016-07-07
@springimport

This is usually referred to as a component:namespace common\components\Name;

M
Maxim Timofeev, 2016-07-07
@webinar

Anywhere. If only it was convenient for you and not in a public folder. For example, create a myclass folder in the common folder and put it there.

S
Skrolea, 2016-07-07
@Skrolea

You write what he does. It can be a component, a widget, anything.

M
mitaichik, 2016-07-08
@mitaichik

This question calls holivars even among professionals ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question