K
K
Kolya Vantukh2017-04-09 12:39:59
Yii
Kolya Vantukh, 2017-04-09 12:39:59

Where to store functions for controller (yii2)?

I'm making a service on yii2, trying to follow the mvc architecture. In recent times, there has often been such a moment that it is necessary to place a separate function in the action of the controller. But due to the fact that the function is quite large, all its code must be moved somewhere. But where is it? it makes no sense to shove the model, there is almost no logic in the function, just sending push notifications to the browser. To create a new controller, from which then to inherit, is also somehow silly in my opinion. How to be in such a situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-04-09
@webinar

Can be implemented as a behavior, can be implemented as a helper

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question