D
D
Dmitry Baibukhtin2014-09-21 15:43:07
Yii
Dmitry Baibukhtin, 2014-09-21 15:43:07

Where is it better to use ActiveRecord, in the controller or in the model?

Good evening. Please tell me where it would be more correct to use ActiveRecord (Yii framework): directly in the controller or in the controller to use a model that will operate with an ActiveRecord object?
The second option will allow you to use the same method in different parts of the module, but you will need to write a bicycle method to receive data.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pasha, 2014-09-21
@PiloTeZ

In the model.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question