I have been using Yii2 for a few months now and I have a question. Since Yii2 has a unique feature to generate model (Gii) which extends \yii\db\ActiveRecord, I am wondering if calling conditionals, join, order by and group by from Controller violates the MVC rule?
For example, if I call this from Controller :
$model = VisitorData::find()
->joinWith(‘iDVISITOR’) //relation generated by Gii
->andWhere([’<>’, ‘a.ID_STATUS’, ‘3’])
Will that violate the MVC rule?(I should put that snippet in a function within VisitorData Model) or is it okay since I did not build the query from scratch?
Hoping for feedbacks.