A
A
alex4answ2019-02-14 18:16:12
Yii
alex4answ, 2019-02-14 18:16:12

Own class for yii2?

Hello, I'm a little confused.
I have a helper class that I will rarely use, how can I connect it to yii2 ?
Now I have done it through the yii extension, but I'm not sure if this is correct.
Please tell me what would be the best way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2019-02-14
@alex4answ

if you plan to use this helper in other projects and/or develop it separately from the project, making it an extension is a good idea. If this is an integral part of the project, then you just had to create a helpers folder and throw it there. Are you sure that your helper is a helper?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question